Fixed a bug Cal found on null termination of a result for memcached_fetch()
[m6w6/libmemcached] / lib / memcached_storage.c
index 3f55796d52b6e5f92375f6113e6581be7e8f3a7d..43a96636130aae2455f1f7c2d7f558cc14f01a22 100644 (file)
@@ -20,7 +20,7 @@ typedef enum {
 } memcached_storage_action;
 
 /* Inline this */
-char *storage_op_string(memcached_storage_action verb)
+static char *storage_op_string(memcached_storage_action verb)
 {
   switch (verb)
   {
@@ -108,14 +108,10 @@ static inline memcached_return memcached_send(memcached_st *ptr,
   }
 
   if (to_write == 0)
-  {
     rc= MEMCACHED_SUCCESS;
-    memcached_server_response_increment(ptr, server_key);
-  }
   else
-  {
-    rc= memcached_response(ptr, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, server_key);
-  }
+    rc= memcached_response(ptr, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL, server_key);
+
   if (rc == MEMCACHED_STORED)
     return MEMCACHED_SUCCESS;
   else