projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Updated for help commands (and a little bit on ketama)
[m6w6/libmemcached]
/
lib
/
memcached_storage.c
diff --git
a/lib/memcached_storage.c
b/lib/memcached_storage.c
index fc3c3cbab73f199e0e0fce477f1dc690a2c735bd..6b76375cdb20bd62505f9ee5e5fcec5061af048e 100644
(file)
--- a/
lib/memcached_storage.c
+++ b/
lib/memcached_storage.c
@@
-37,14
+37,14
@@
static memcached_return memcached_send(memcached_st *ptr,
memset(buffer, 0, MEMCACHED_DEFAULT_COMMAND_SIZE);
memset(buffer, 0, MEMCACHED_DEFAULT_COMMAND_SIZE);
- rc= memcached_connect(ptr);
- if (rc != MEMCACHED_SUCCESS)
- return rc;
-
/* Leaveing this assert in since only a library fubar could blow this */
assert(ptr->write_buffer_offset == 0);
/* Leaveing this assert in since only a library fubar could blow this */
assert(ptr->write_buffer_offset == 0);
- server_key= memcached_generate_hash(key, key_length) % ptr->number_of_hosts;
+ server_key= memcached_generate_hash(ptr, key, key_length);
+
+ rc= memcached_connect(ptr, server_key);
+ if (rc != MEMCACHED_SUCCESS)
+ return rc;
write_length= snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
"%s %.*s %x %llu %zu\r\n", storage_op_string(verb),
write_length= snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
"%s %.*s %x %llu %zu\r\n", storage_op_string(verb),