From 20c7a5d63dc1f68fcf0e1aa053a4b725235e6f78 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 3 Sep 2007 14:51:37 +0000 Subject: Added some XML parsing => DOM (pracro, requests and commits). --- server/src/server.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'server/src/server.cc') diff --git a/server/src/server.cc b/server/src/server.cc index 288dbe1..58b54b9 100644 --- a/server/src/server.cc +++ b/server/src/server.cc @@ -97,7 +97,9 @@ static void connection(TCPSocket &socket) int fd = open(macro.c_str(), O_RDONLY); if(fd == -1) { - fprintf(stderr, "Aaargh... cannot open file...[%s]\n", macro.c_str()); + printf("Cannot open file \"%s\"...", macro.c_str()); + printf("failed!\n"); + i++; continue; } @@ -114,7 +116,16 @@ static void connection(TCPSocket &socket) // Handle commits Commits::iterator j = transaction.commits.begin(); while(j != transaction.commits.end()) { - printf("Commit...\n"); + 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; + printf("\t%s=%s\n", val.name.c_str(), val.value.c_str()); + k++; + } + j++; } -- cgit v1.2.3