From: Sebastian Harl Date: Thu, 24 Apr 2014 07:31:59 +0000 (+0200) Subject: frontend: Reset the current command length on CONNECTION_IDLE. X-Git-Tag: sysdb-0.1.0~86 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6993e1dcf488d2bab6d4cb3cab595b51fb796aad;p=sysdb.git frontend: Reset the current command length on CONNECTION_IDLE. --- diff --git a/src/frontend/connection.c b/src/frontend/connection.c index 3d28841..a146e29 100644 --- a/src/frontend/connection.c +++ b/src/frontend/connection.c @@ -375,8 +375,10 @@ command_init(sdb_conn_t *conn) conn->cmd_len = connection_get_int32(conn, sizeof(uint32_t)); len = 2 * sizeof(uint32_t); - if (conn->cmd == CONNECTION_IDLE) + if (conn->cmd == CONNECTION_IDLE) { len += conn->cmd_len; + conn->cmd_len = 0; + } sdb_strbuf_skip(conn->buf, 0, len); return 0; } /* command_init */