summaryrefslogtreecommitdiff
path: root/server/src/transactionparser.cc
diff options
context:
space:
mode:
authordeva <deva>2008-05-20 14:03:10 +0000
committerdeva <deva>2008-05-20 14:03:10 +0000
commit556f00e4af55e78836c45f47b0662ab44bbb8b48 (patch)
treea5c315b35d400a397a35a86b86fe656d3a829af9 /server/src/transactionparser.cc
parent91d56787bec83a3a7c2ad6afd84d2b82c5d869b9 (diff)
Made fixes pointed out by GCC 4.2 and -D_FORTIFY_SOURCES=2
Diffstat (limited to 'server/src/transactionparser.cc')
-rw-r--r--server/src/transactionparser.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/src/transactionparser.cc b/server/src/transactionparser.cc
index 547a9a7..47df2bc 100644
--- a/server/src/transactionparser.cc
+++ b/server/src/transactionparser.cc
@@ -77,3 +77,12 @@ int TransactionParser::readData(char *data, size_t size)
if(done) return 0;
return socket->read(data, size);
}
+
+void TransactionParser::parseError(char *buf, size_t len, std::string error, int lineno)
+{
+ fprintf(stderr, "TransactionParser error at line %d: %s\n", lineno, error.c_str());
+ fprintf(stderr, "\tBuffer %u bytes: [", len);
+ if(fwrite(buf, len, 1, stderr) != len) {}
+ fprintf(stderr, "]\n");
+ fflush(stderr);
+}