summaryrefslogtreecommitdiff
path: root/server/src/server.cc
diff options
context:
space:
mode:
authordeva <deva>2007-09-14 12:25:54 +0000
committerdeva <deva>2007-09-14 12:25:54 +0000
commitb70c9b6843e15ee5764b8457acea930af0d2b285 (patch)
tree677c770b3f0e20c2081661f0a2c5d144a0ce5a24 /server/src/server.cc
parent1a0bd4c03c4045d9cc1b3c0bcec39487fa9c5486 (diff)
Commits are now committed to the database.
Diffstat (limited to 'server/src/server.cc')
-rw-r--r--server/src/server.cc17
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");