X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fresponse.cc;h=554f6dce3852fe67011b81d8e617c5fde819cb8a;hb=5dcfd8799e2ab7d60b8d3b352474d43556d37dcf;hp=ad3c0785dfa24bed1e1bc2b09b1488e08d2f85ee;hpb=95bb4cd1ce48756ca12e5cc1bb6bd6ff8f457908;p=awesomized%2Flibmemcached diff --git a/libmemcached/response.cc b/libmemcached/response.cc index ad3c0785..554f6dce 100644 --- a/libmemcached/response.cc +++ b/libmemcached/response.cc @@ -309,8 +309,9 @@ static memcached_return_t textual_read_one_response(memcached_instance_st* insta return MEMCACHED_E2BIG; } - if (total_read >= memcached_literal_param_size("SERVER_ERROR out of memory storing object") and - (memcmp(buffer, memcached_literal_param("SERVER_ERROR out of memory storing object")) == 0)) + if (total_read >= memcached_literal_param_size("SERVER_ERROR out of memory") and + ((memcmp(buffer, memcached_literal_param("SERVER_ERROR out of memory")) == 0) or + (memcmp(buffer, memcached_literal_param("SERVER_ERROR Out of memory")) == 0))) { return MEMCACHED_SERVER_MEMORY_ALLOCATION_FAILURE; } @@ -782,7 +783,7 @@ static memcached_return_t binary_read_one_response(memcached_instance_st* instan case PROTOCOL_BINARY_CMD_REPLACEQ: case PROTOCOL_BINARY_CMD_APPENDQ: case PROTOCOL_BINARY_CMD_PREPENDQ: - return binary_read_one_response(instance, buffer, buffer_length, result); + return MEMCACHED_FETCH_NOTFINISHED; default: break; @@ -848,7 +849,9 @@ static memcached_return_t _read_one_response(memcached_instance_st* instance, memcached_return_t rc; if (memcached_is_binary(instance->root)) { - rc= binary_read_one_response(instance, buffer, buffer_length, result); + do { + rc= binary_read_one_response(instance, buffer, buffer_length, result); + } while (rc == MEMCACHED_FETCH_NOTFINISHED); } else {