summaryrefslogtreecommitdiff
path: root/server/src/xmlparser.cc
diff options
context:
space:
mode:
authordeva <deva>2007-09-03 09:58:51 +0000
committerdeva <deva>2007-09-03 09:58:51 +0000
commit41e5a068b0b595be86797fd12035dabb87c21f36 (patch)
tree7d9dd21b54d5d8075b220e5aa06526387ca53d20 /server/src/xmlparser.cc
parentf49186b63888caedd5e0dad4a52a680fb28834a4 (diff)
Simplified TCP socket write of strings. Cleaned up debug output.
Diffstat (limited to 'server/src/xmlparser.cc')
-rw-r--r--server/src/xmlparser.cc14
1 files changed, 6 insertions, 8 deletions
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());
}