Updates to libhashkit.
[awesomized/libmemcached] / libmemcached / get.c
index 97f1c29940258813f41f0e068b6c2c03ff9399e4..a7d0ebc6fe457c7f9c153a514cb00fd04df5c811 100644 (file)
@@ -244,7 +244,7 @@ static memcached_return_t memcached_mget_by_key_real(memcached_st *ptr,
     }
 
     /* Only called when we have a prefix key */
-    if (ptr->prefix_key[0] != 0)
+    if (ptr->prefix_key_length)
     {
       if ((memcached_io_write(instance, ptr->prefix_key, ptr->prefix_key_length, 0)) == -1)
       {
@@ -577,13 +577,13 @@ static memcached_return_t binary_mget_by_key(memcached_st *ptr,
     uint32_t* hash;
     bool* dead_servers;
 
-    hash= ptr->call_malloc(ptr, sizeof(uint32_t) * number_of_keys);
-    dead_servers= ptr->call_calloc(ptr, memcached_server_count(ptr), sizeof(bool));
+    hash= libmemcached_malloc(ptr, sizeof(uint32_t) * number_of_keys);
+    dead_servers= libmemcached_calloc(ptr, memcached_server_count(ptr), sizeof(bool));
 
     if (hash == NULL || dead_servers == NULL)
     {
-      ptr->call_free(ptr, hash);
-      ptr->call_free(ptr, dead_servers);
+      libmemcached_free(ptr, hash);
+      libmemcached_free(ptr, dead_servers);
       return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
     }
 
@@ -597,8 +597,8 @@ static memcached_return_t binary_mget_by_key(memcached_st *ptr,
     rc= replication_binary_mget(ptr, hash, dead_servers, keys,
                                 key_length, number_of_keys);
 
-    ptr->call_free(ptr, hash);
-    ptr->call_free(ptr, dead_servers);
+    libmemcached_free(ptr, hash);
+    libmemcached_free(ptr, dead_servers);
 
     return MEMCACHED_SUCCESS;
   }