diff options
Diffstat (limited to 'server/src/server.cc')
-rw-r--r-- | server/src/server.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/src/server.cc b/server/src/server.cc index 2a4c882..930a6e7 100644 --- a/server/src/server.cc +++ b/server/src/server.cc @@ -81,7 +81,8 @@ static void connection(TCPSocket &socket) printf("Got connection...\n"); Transaction transaction; - parse(socket, transaction); + XMLParser parser(socket, transaction); + parser.parse(); socket.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); socket.write("<pracro version=\"1.0\">\n"); @@ -94,7 +95,8 @@ static void connection(TCPSocket &socket) printf("Handling request for \"%s\"...", request.macro.c_str()); Macro macro; - parse_macro(request.macro, macro); + MacroParser parser(request.macro, macro); + parser.parse(); socket.write(" <macro version=\"" + macro.version + "\" name=\"" + macro.name + "\" resume=\"" + macro.format + "\">\n"); @@ -122,7 +124,8 @@ static void connection(TCPSocket &socket) db.post(transaction.user, transaction.cpr, now, commit); Macro macro; - parse_macro(commit.macro, macro); + MacroParser parser(commit.macro, macro); + parser.parse(); std::string resume = resume_parser(macro.format.c_str(), commit); |