summaryrefslogtreecommitdiff
path: root/server/src/server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/server.cc')
-rw-r--r--server/src/server.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/server/src/server.cc b/server/src/server.cc
index 77b3a6f..e85c35c 100644
--- a/server/src/server.cc
+++ b/server/src/server.cc
@@ -58,24 +58,28 @@ static void connection(TCPSocket &socket)
Database db;
- /*
//
// Handle commits
//
if(transaction.commits.size() > 0) {
- time_t now = time(NULL);
-
Commits::iterator i = transaction.commits.begin();
while(i != transaction.commits.end()) {
Commit &commit = *i;
- Database db;
- db.post(transaction.user, transaction.cpr, now, commit);
-
+ /*
Macro macro;
MacroParser parser(commit.macro, macro);
parser.parse();
+ */
+
+ Macro macro;
+ macro.attributes["name"] = commit.macro;
+ macro.attributes["version"] = "1.0";//commit.version;
+
+ db.commit(transaction.user, transaction.cpr, macro, commit.fields);
+
+ /*
std::string resume = resume_parser(macro.format.c_str(), commit);
std::string journal_commit_addr = config()->lookup("journal_commit_addr");
@@ -84,11 +88,10 @@ static void connection(TCPSocket &socket)
journal_commit(transaction.cpr.c_str(), transaction.user.c_str(),
journal_commit_addr.c_str(), journal_commit_port,
resume.c_str(), resume.length());
-
+ */
i++;
}
}
- */
//
// Handle requests