diff options
Diffstat (limited to 'server/src/server.cc')
-rw-r--r-- | server/src/server.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/server/src/server.cc b/server/src/server.cc index 58b54b9..24f55ef 100644 --- a/server/src/server.cc +++ b/server/src/server.cc @@ -49,6 +49,8 @@ #include "transaction.h" #include "xmlparser.h" +#include "database.h" + /** \section{Data transmission} En transmission består af en række deltransmissioner som afhænger af @@ -114,20 +116,27 @@ static void connection(TCPSocket &socket) } // Handle commits + if(transaction.commits.size() > 0) { + Database db; + db.post(transaction); + } + + /* Commits::iterator j = transaction.commits.begin(); while(j != transaction.commits.end()) { - Commit commit = *j; + Commit &commit = *j; printf("Commit %s\n", commit.macro.c_str()); - CommitValues::iterator k = commit.values.begin(); - while(k != commit.values.end()) { - CommitValue val = *k; + Fields::iterator k = commit.fields.begin(); + while(k != commit.fields.end()) { + Field &val = *k; printf("\t%s=%s\n", val.name.c_str(), val.value.c_str()); k++; } j++; } + */ socket.write("</pracro>\n"); |