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
/
storage.c
diff --git
a/libmemcached/storage.c
b/libmemcached/storage.c
index c0db470ca80fd5f1b2c54890c1f334ab746e21ff..fe480fe4a6be69348dd7619eb58a50967ecbd941 100644
(file)
--- a/
libmemcached/storage.c
+++ b/
libmemcached/storage.c
@@
-98,8
+98,9
@@
static inline memcached_return_t memcached_send(memcached_st *ptr,
if (cas)
{
write_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
if (cas)
{
write_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
- "%s %s%.*s %u %llu %zu %llu%s\r\n",
+ "%s %
.*
s%.*s %u %llu %zu %llu%s\r\n",
storage_op_string(verb),
storage_op_string(verb),
+ (int)ptr->prefix_key_length,
ptr->prefix_key,
(int)key_length, key, flags,
(unsigned long long)expiration, value_length,
ptr->prefix_key,
(int)key_length, key, flags,
(unsigned long long)expiration, value_length,
@@
-115,10
+116,10
@@
static inline memcached_return_t memcached_send(memcached_st *ptr,
memcpy(buffer_ptr, command, strlen(command));
/* Copy in the key prefix, switch to the buffer_ptr */
memcpy(buffer_ptr, command, strlen(command));
/* Copy in the key prefix, switch to the buffer_ptr */
- buffer_ptr= memcpy((buffer_ptr + strlen(command)), ptr->prefix_key,
strlen(ptr->prefix_key)
);
+ buffer_ptr= memcpy((buffer_ptr + strlen(command)), ptr->prefix_key,
ptr->prefix_key_length
);
/* Copy in the key, adjust point if a key prefix was used. */
/* Copy in the key, adjust point if a key prefix was used. */
- buffer_ptr= memcpy(buffer_ptr + (ptr->prefix_key
? strlen(ptr->prefix_key)
: 0),
+ buffer_ptr= memcpy(buffer_ptr + (ptr->prefix_key
_length ? ptr->prefix_key_length
: 0),
key, key_length);
buffer_ptr+= key_length;
buffer_ptr[0]= ' ';
key, key_length);
buffer_ptr+= key_length;
buffer_ptr[0]= ' ';