summaryrefslogtreecommitdiff
path: root/server/src/server.cc
diff options
context:
space:
mode:
authordeva <deva>2008-03-18 11:24:44 +0000
committerdeva <deva>2008-03-18 11:24:44 +0000
commit589fd5ffdeaae87410c31c497083e609e7ae1f53 (patch)
treec8c7eada1049e3ed256248200ec1e76345276e2e /server/src/server.cc
parenta860976a62d206a1de5aa46f624bcac0036f47c2 (diff)
Added journal commit code.
Diffstat (limited to 'server/src/server.cc')
-rw-r--r--server/src/server.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/server/src/server.cc b/server/src/server.cc
index 815f0db..756539f 100644
--- a/server/src/server.cc
+++ b/server/src/server.cc
@@ -50,6 +50,8 @@
#include "tostring.h"
#include <time.h>
+#include "journal_commit.h"
+
static void send_macro_widget(Widget &widget, TCPSocket &socket, std::string tabs)
{
socket.write(tabs + "<" + widget.type);
@@ -113,14 +115,15 @@ static void connection(TCPSocket &socket)
Macro macro;
parse_macro(commit.macro, macro);
- //parse_macro("example", macro);
-
- macro.format = "Det koster 50$$\\n\\tLinse: ${linse}D\\n"
- "\\y${combo}\\\\\\nHævelse: ${radio}\\n\\n${spl_note}";
std::string resume = resume_parser(macro.format.c_str(), commit);
- printf("%s\n", resume.c_str());
+ std::string journal_commit_addr = config()->lookup("journal_commit_addr");
+ int journal_commit_port = config()->lookup("journal_commit_port");
+
+ journal_commit(transaction.cpr.c_str(), transaction.user.c_str(),
+ journal_commit_addr.c_str(), journal_commit_port,
+ resume.c_str(), resume.length());
i++;
}