summaryrefslogtreecommitdiff
path: root/src/messageparser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/messageparser.cc')
-rw-r--r--src/messageparser.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/messageparser.cc b/src/messageparser.cc
index 5714c88..8f4cc16 100644
--- a/src/messageparser.cc
+++ b/src/messageparser.cc
@@ -69,9 +69,7 @@ inline static void parse_into_msg_tokens(std::string& data,
token += ch;
}
else {
- if(!token.empty()) {
- tokenVector.push_back(token);
- }
+ tokenVector.push_back(token);
msgTokensList.push_back(tokenVector);
tokenVector.clear();
token.clear();
@@ -84,10 +82,10 @@ inline static void parse_into_msg_tokens(std::string& data,
prev_ch = ch;
}
- if(!token.empty()) {
+// if(!token.empty()) {
tokenVector.push_back(token);
token.clear();
- }
+// }
if(!tokenVector.empty()) {
msgTokensList.push_back(tokenVector);
@@ -112,7 +110,7 @@ inline static void create_msg_list(MsgTokensList& msgTokensList,
message_t m;
-// printf("t[%d] : %s, running in clientmode: %d\n", origin, t[origin].c_str(), clientmode);
+ printf("t[%d] : %s, running in clientmode: %d\n", origin, t[origin].c_str(), clientmode);
// printf("%d\n", t.size());
@@ -195,7 +193,7 @@ inline static void create_msg_list(MsgTokensList& msgTokensList,
}
MessageList parse_msg(std::string data) {
-// printf("Parsing: %s\n", data.c_str());
+ printf("Parsing: %s\n", data.c_str());
MsgTokensList msgTokensList;
parse_into_msg_tokens(data, msgTokensList);
@@ -207,6 +205,7 @@ MessageList parse_msg(std::string data) {
}
MessageList parse_msg_client(std::string data) {
+ printf("Parsing: \n%s\n", data.c_str());
MsgTokensList msgTokensList;
parse_into_msg_tokens(data, msgTokensList);