summaryrefslogtreecommitdiff
path: root/src/task_proto.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/task_proto.cc')
-rw-r--r--src/task_proto.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/task_proto.cc b/src/task_proto.cc
index f1d22d1..39232dd 100644
--- a/src/task_proto.cc
+++ b/src/task_proto.cc
@@ -172,8 +172,10 @@ int callback_lws_task(struct libwebsocket_context * context,
char buf[1024];
size_t buf_len = 0;
- msg_t m = parse_msg(data)[0];
-
+ MsgVector msglist = parse_msg(data);
+ MsgVector::iterator it_msg;
+ for(it_msg = msglist.begin(); it_msg != msglist.end(); it_msg++) {
+ msg_t m = *it_msg;
switch(m.cmd) {
case cmd::add: {
printf("Handling add cmd:\n");
@@ -279,6 +281,7 @@ int callback_lws_task(struct libwebsocket_context * context,
libwebsocket_callback_on_writable_all_protocol(libwebsockets_get_protocol(wsi));
//libwebsocket_rx_flow_control(wsi, 0);
}
+ }
break;
/*
* this just demonstrates how to use the protocol filter. If you won't