X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fauto.cc;h=06e7ab6419646abb82121ce5d9a775fb5aaeaa07;hb=32eebdc2e1ae14f41bb15e212036b772760a3fd1;hp=685528f2fae41adc40e8924016fdd3d8b88601c1;hpb=28d3641c8331dfe348a119c6eb4bd776c526da48;p=awesomized%2Flibmemcached diff --git a/libmemcached/auto.cc b/libmemcached/auto.cc index 685528f2..06e7ab64 100644 --- a/libmemcached/auto.cc +++ b/libmemcached/auto.cc @@ -57,8 +57,13 @@ static void auto_response(memcached_instance_st* instance, const bool reply, me assert(memcached_last_error(instance->root) != MEMCACHED_SUCCESS); *value= UINT64_MAX; } + else if (memcached_failed(rc)) + { + *value= UINT64_MAX; + } else { + assert(memcached_last_error(instance->root) != MEMCACHED_NOTFOUND); *value= instance->root->result.numeric_value; } } @@ -230,7 +235,7 @@ static memcached_return_t increment_decrement_with_initial_by_key(const protocol if (memcached_is_encrypted(memc)) { return memcached_set_error(*memc, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT, - memcached_literal_param("Operation not allowed while encyrption is enabled")); + memcached_literal_param("Operation not allowed while encryption is enabled")); } if (memcached_failed(rc= memcached_key_test(*memc, (const char **)&key, &key_length, 1)))