X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fprotocol%2Fbinary_handler.c;h=81c09c99f88f01154857cf4e35e7323f105c873c;hb=de994b897a87ccc8493f31c6b105fc37cfdc90a9;hp=27581ec8093cc0ab7f727924e073ece5114edb84;hpb=0438a012ce75f5067aa95638519a30706494ab74;p=awesomized%2Flibmemcached diff --git a/libmemcached/protocol/binary_handler.c b/libmemcached/protocol/binary_handler.c index 27581ec8..81c09c99 100644 --- a/libmemcached/protocol/binary_handler.c +++ b/libmemcached/protocol/binary_handler.c @@ -3,7 +3,6 @@ #include #include -#include #include #include #include @@ -59,11 +58,11 @@ raw_response_handler(const void *cookie, num_bytes); if (nw == -1) { - if (errno == EWOULDBLOCK) + if (get_socket_errno() == EWOULDBLOCK) { break; } - else if (errno != EINTR) + else if (get_socket_errno() != EINTR) { client->error= errno; return PROTOCOL_BINARY_RESPONSE_EIO; @@ -125,9 +124,10 @@ get_response_handler(const void *cookie, .extlen= 4, .bodylen= htonl(bodylen + keylen + 4), }, - .message.body.flags= htonl(flags), }; + response.message.body.flags= htonl(flags); + protocol_binary_response_status rval; const protocol_binary_response_status success= PROTOCOL_BINARY_RESPONSE_SUCCESS; if ((rval= client->root->spool(client, response.bytes, sizeof(response.bytes))) != success ||