X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fprotocol%2Fbinary_handler.c;h=a9e4ce95890915f0cc067c7004d8ac9944afb7a5;hb=18ace40ddb7271f3f5e71965f74fe11d7754bd8f;hp=81c09c99f88f01154857cf4e35e7323f105c873c;hpb=2230ba7b89bbaa989de311f9d7ea6d6e2cd5a9b8;p=awesomized%2Flibmemcached diff --git a/libmemcached/protocol/binary_handler.c b/libmemcached/protocol/binary_handler.c index 81c09c99..a9e4ce95 100644 --- a/libmemcached/protocol/binary_handler.c +++ b/libmemcached/protocol/binary_handler.c @@ -39,7 +39,7 @@ raw_response_handler(const void *cookie, if (!client->root->drain(client)) { - return PROTOCOL_BINARY_RESPONSE_EIO; + return PROTOCOL_BINARY_RESPONSE_EINTERNAL; } size_t len= sizeof(*response) + htonl(response->response.bodylen); @@ -65,7 +65,7 @@ raw_response_handler(const void *cookie, else if (get_socket_errno() != EINTR) { client->error= errno; - return PROTOCOL_BINARY_RESPONSE_EIO; + return PROTOCOL_BINARY_RESPONSE_EINTERNAL; } } else @@ -700,7 +700,7 @@ quit_command_handler(const void *cookie, } /* I need a better way to signal to close the connection */ - return PROTOCOL_BINARY_RESPONSE_EIO; + return PROTOCOL_BINARY_RESPONSE_EINTERNAL; } /** @@ -970,8 +970,8 @@ static protocol_binary_response_status execute_command(memcached_protocol_client } if (rval != PROTOCOL_BINARY_RESPONSE_SUCCESS && - rval != PROTOCOL_BINARY_RESPONSE_EIO && - rval != PROTOCOL_BINARY_RESPONSE_PAUSE) + rval != PROTOCOL_BINARY_RESPONSE_EINTERNAL && + rval != PROTOCOL_BINARY_RESPONSE_NOT_SUPPORTED) { protocol_binary_response_no_extras response= { .message= { @@ -1018,12 +1018,12 @@ memcached_protocol_event_t memcached_binary_protocol_process_data(memcached_prot client->current_command= header; protocol_binary_response_status rv= execute_command(client, header); - if (rv == PROTOCOL_BINARY_RESPONSE_EIO) + if (rv == PROTOCOL_BINARY_RESPONSE_EINTERNAL) { *length= len; *endptr= (void*)header; return MEMCACHED_PROTOCOL_ERROR_EVENT; - } else if (rv == PROTOCOL_BINARY_RESPONSE_PAUSE) + } else if (rv == PROTOCOL_BINARY_RESPONSE_NOT_SUPPORTED) return MEMCACHED_PROTOCOL_PAUSE_EVENT; ssize_t total= (ssize_t)(sizeof(*header) + ntohl(header->request.bodylen));