Add test case for situation where callback shouldn't be set because of behavior settings.
[awesomized/libmemcached] / libmemcached / auto.cc
index 9a044faad6f8d0d3f68111cbdd5c0bd87bb61d78..d0b7dd4813bb3116738f5713d4e048b68496954b 100644 (file)
@@ -75,9 +75,9 @@ static memcached_return_t text_incr_decr(memcached_st *ptr,
 
   rc= memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL);
 
-  if (rc == MEMCACHED_SUCCESS)
+  if (rc != MEMCACHED_SUCCESS)
   {
-    return MEMCACHED_SUCCESS;
+    return memcached_set_error(*instance, rc, MEMCACHED_AT);
   }
 
   /*