diff options
-rw-r--r-- | server/src/transactionparser.cc | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/server/src/transactionparser.cc b/server/src/transactionparser.cc index 3d3024c..1dbeb39 100644 --- a/server/src/transactionparser.cc +++ b/server/src/transactionparser.cc @@ -79,20 +79,6 @@ int TransactionParser::readData(char *data, size_t size) { printf("readData is not uasble with transaction parser!.\nUse parse(std::string) instead.\n"); return 0; -/* - if(done) return 0; - - int ret; - - // while((ret = socket->read(data, size, 1000)) == 0) { } - - if(ret == -1) { - printf("Transaction parser was interrupted.\n"); - return 0; - } - - return ret; -*/ } bool TransactionParser::parse(std::string data) @@ -103,8 +89,8 @@ bool TransactionParser::parse(std::string data) } if(done) { - if(! XML_Parse(p, "", 0, true) ) { - parseError("", 0, XML_ErrorString(XML_GetErrorCode(p)), (int)XML_GetCurrentLineNumber(p)); + if(! XML_Parse(p, (char*)data.c_str(), 0, true) ) { + parseError((char*)data.c_str(), 0, XML_ErrorString(XML_GetErrorCode(p)), (int)XML_GetCurrentLineNumber(p)); return false; } } |