projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Updated for custom hash functions/setting functions.
[awesomized/libmemcached]
/
libmemcached
/
delete.c
diff --git
a/libmemcached/delete.c
b/libmemcached/delete.c
index 8b531acdcff79035321100107d069bf143dbf9ae..b29101b4cf47990d5a1c8e3ed24dc3c26797ec33 100644
(file)
--- a/
libmemcached/delete.c
+++ b/
libmemcached/delete.c
@@
-33,7
+33,7
@@
memcached_return_t memcached_delete_by_key(memcached_st *ptr,
unlikely (rc != MEMCACHED_SUCCESS)
return rc;
unlikely (rc != MEMCACHED_SUCCESS)
return rc;
- unlikely (
ptr->hosts == NULL ||
memcached_server_count(ptr) == 0)
+ unlikely (memcached_server_count(ptr) == 0)
return MEMCACHED_NO_SERVERS;
server_key= memcached_generate_hash(ptr, master_key, master_key_length);
return MEMCACHED_NO_SERVERS;
server_key= memcached_generate_hash(ptr, master_key, master_key_length);
@@
-90,7
+90,8
@@
memcached_return_t memcached_delete_by_key(memcached_st *ptr,
}
}
send_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
}
}
send_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
- "delete %s%.*s %u%s\r\n",
+ "delete %.*s%.*s %u%s\r\n",
+ (int)ptr->prefix_key_length,
ptr->prefix_key,
(int) key_length, key,
(uint32_t)expiration,
ptr->prefix_key,
(int) key_length, key,
(uint32_t)expiration,
@@
-99,7
+100,8
@@
memcached_return_t memcached_delete_by_key(memcached_st *ptr,
}
else
send_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
}
else
send_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
- "delete %s%.*s%s\r\n",
+ "delete %.*s%.*s%s\r\n",
+ (int)ptr->prefix_key_length,
ptr->prefix_key,
(int)key_length, key, no_reply ? " noreply" :"");
ptr->prefix_key,
(int)key_length, key, no_reply ? " noreply" :"");