diff options
author | deva <deva> | 2008-05-26 13:56:30 +0000 |
---|---|---|
committer | deva <deva> | 2008-05-26 13:56:30 +0000 |
commit | 192e0f80bd2da45f1c612411fded2e805ac205de (patch) | |
tree | 95407dd47edc6062a6250382ca345d320b7665be /server/src/server.cc | |
parent | b0be417b31e2d2577c188a563d531889354b7617 (diff) |
Completed the prefilling of the fields, from the db and pentominos, according to their timestamps.
Diffstat (limited to 'server/src/server.cc')
-rw-r--r-- | server/src/server.cc | 19 |
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 |