From 41e5a068b0b595be86797fd12035dabb87c21f36 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 3 Sep 2007 09:58:51 +0000 Subject: Simplified TCP socket write of strings. Cleaned up debug output. --- server/src/xmlparser.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'server/src/xmlparser.cc') diff --git a/server/src/xmlparser.cc b/server/src/xmlparser.cc index 8020a80..7e5fb14 100644 --- a/server/src/xmlparser.cc +++ b/server/src/xmlparser.cc @@ -39,9 +39,7 @@ void start_hndl(void *p, const char *el, const char **attr) { Transaction *transaction = (Transaction*)XML_GetUserData(p); - printf("Data %p\n", transaction); - - printf("Start tag [%s]\n", el); + // printf("Start tag [%s]\n", el); // Convert to comfy C++ values... std::string name = el; @@ -67,7 +65,7 @@ void start_hndl(void *p, const char *el, const char **attr) if(name == "request") { Request r; r.macro = attributes["macro"]; - printf("%s\n", r.macro.c_str()); + // printf("%s\n", r.macro.c_str()); transaction->requests.push_back(r); } @@ -75,7 +73,7 @@ void start_hndl(void *p, const char *el, const char **attr) void end_hndl(void *p, const char *el) { - printf("End tag [%s]\n", el); + // printf("End tag [%s]\n", el); if(!strcmp(el, "pracro")) done = true; } @@ -85,7 +83,8 @@ void parse(TCPSocket &socket, Transaction &transaction) XML_Parser p = XML_ParserCreate(NULL); if (! p) { fprintf(stderr, "Couldn't allocate memory for parser\n"); - exit(-1); + // throw Exception(...); + return; } XML_SetUserData(p, &transaction); @@ -105,12 +104,11 @@ void parse(TCPSocket &socket, Transaction &transaction) fprintf(stderr, "Parse error at line %d:\n%s\n", XML_GetCurrentLineNumber(p), XML_ErrorString(XML_GetErrorCode(p))); - // exit(-1); // throw Exception(...); return; } } - printf("%d requests\n", transaction.requests.size()); + // printf("%d requests\n", transaction.requests.size()); } -- cgit v1.2.3