From 89ccf8e281aacb6dac7f6c530d4673144b9bbed9 Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Fri, 18 May 2012 10:31:40 +0200 Subject: Fixed id in collapse code. --- src/munia_proto.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/munia_proto.cc b/src/munia_proto.cc index 7e63d73..480ba39 100644 --- a/src/munia_proto.cc +++ b/src/munia_proto.cc @@ -117,8 +117,9 @@ int callback_lws_task(struct libwebsocket_context * context, while(j != msgqueue[wsi].end()) { message_t m = *j; if(m.cmd == cmd::create && // msg was a create msg? - // create with same ids as we just removed? - msg.remove.id == m.create.id && msg.tid == m.tid) { + // created with same ids as we just removed? + msg.remove.id == m.create.id && + msg.tid == m.tid) { break; } j++; @@ -127,7 +128,7 @@ int callback_lws_task(struct libwebsocket_context * context, // collapse into move msg if(j != msgqueue[wsi].end()) { taskid_t id = j->create.id; - taskid_t parentid = j->create.id; + taskid_t parentid = j->create.parentid; msgqueue[wsi].erase(j); // erase create msg msg.cmd = cmd::move; msg.move.id = id; @@ -137,7 +138,6 @@ int callback_lws_task(struct libwebsocket_context * context, i++; } - std::string msgstr; msgstr.append((size_t)LWS_SEND_BUFFER_PRE_PADDING, ' '); -- cgit v1.2.3