summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f835433)
raw | patch | inline | side by side (parent: f835433)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 5 Dec 2013 17:21:01 +0000 (18:21 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 5 Dec 2013 17:21:01 +0000 (18:21 +0100) |
src/client/sock.c | patch | blob | history | |
src/include/client/sock.h | patch | blob | history |
diff --git a/src/client/sock.c b/src/client/sock.c
index ffabdc1b74add0a1a7d09c0575ccf36a1ef59115..f4f4c556e82012c99927c721fe98697933c939d0 100644 (file)
--- a/src/client/sock.c
+++ b/src/client/sock.c
break;
}
+ if (rstatus != UINT32_MAX)
+ /* remove status,len */
+ sdb_strbuf_skip(buf, data_offset, 2 * sizeof(rstatus));
+
if (code)
*code = rstatus;
index 5980d085ab4546c7dffd5e76c988c836aa301d00..e33f4d769b01d2451ba6c019a7b0a885f4bfb3b5 100644 (file)
* Receive data from the connection. All data is written to the specified
* buffer. If specified, the returned status code is written to the memory
* location pointed to by 'code'. In case of an error or an incomplete
- * command, the status code is set to UINT32_MAX.
+ * command, the status code is set to UINT32_MAX. The returned data does not
+ * include the status code and message len as received from the remote side
+ * but only the data associated with the message.
*
* Returns:
* - the number of bytes read
+ * (may be zero if the message did not include any data)
* - a negative value on error
*/
ssize_t