summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9006439)
raw | patch | inline | side by side (parent: 9006439)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 15 Dec 2014 09:46:25 +0000 (10:46 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 15 Dec 2014 09:46:25 +0000 (10:46 +0100) |
src/frontend/connection.c | patch | blob | history |
index 58a2cb4d3e3d06d510927b57b414f37bc3af425c..09f906c045183fc9ab4e6d59b538580d7eed5e1f 100644 (file)
/* reset */
sdb_strbuf_clear(conn->errbuf);
- conn->cmd = sdb_proto_get_int(conn->buf, 0);
- conn->cmd_len = sdb_proto_get_int(conn->buf, sizeof(uint32_t));
-
+ if (sdb_proto_unmarshal_header(conn->buf, &conn->cmd, &conn->cmd_len))
+ return -1;
sdb_strbuf_skip(conn->buf, 0, 2 * sizeof(uint32_t));
if ((! conn->ready) && (conn->cmd != SDB_CONNECTION_STARTUP))