Adds additional test cases and checks for binary for increment and decrement with...
[awesomized/libmemcached] / libmemcached / auto.cc
index 685528f2fae41adc40e8924016fdd3d8b88601c1..04efe85d7975cdcd3dd4fb55272947353e500477 100644 (file)
@@ -54,11 +54,17 @@ static void auto_response(memcached_instance_st* instance, const bool reply,  me
 
   if (memcached_fatal(rc))
   {
+    fprintf(stderr, "%s:%d %s\n", __FILE__, __LINE__, memcached_strerror(NULL, rc));
     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;
   }
 }