projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix the incr/decr operation connection closed bug
[m6w6/libmemcached]
/
libmemcached
/
memcached_callback.c
diff --git
a/libmemcached/memcached_callback.c
b/libmemcached/memcached_callback.c
index 52afbb947117f37b55e0db5a427a832b6860fe60..5e36ddf6cfc04d57dbfd248535758a54e0718ab1 100644
(file)
--- a/
libmemcached/memcached_callback.c
+++ b/
libmemcached/memcached_callback.c
@@
-22,14
+22,20
@@
memcached_return memcached_callback_set(memcached_st *ptr,
size_t key_length= strlen(key);
if ((ptr->flags & MEM_VERIFY_KEY) && (memcachd_key_test((char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
size_t key_length= strlen(key);
if ((ptr->flags & MEM_VERIFY_KEY) && (memcachd_key_test((char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
+ {
return MEMCACHED_BAD_KEY_PROVIDED;
return MEMCACHED_BAD_KEY_PROVIDED;
+ }
- if ((
ptr->prefix_
key_length > MEMCACHED_PREFIX_KEY_MAX_SIZE -1)
+ if ((key_length > MEMCACHED_PREFIX_KEY_MAX_SIZE -1)
|| (strcpy(ptr->prefix_key, key) == NULL))
{
ptr->prefix_key_length= 0;
return MEMCACHED_BAD_KEY_PROVIDED;
}
|| (strcpy(ptr->prefix_key, key) == NULL))
{
ptr->prefix_key_length= 0;
return MEMCACHED_BAD_KEY_PROVIDED;
}
+ else
+ {
+ ptr->prefix_key_length= key_length;
+ }
}
else
{
}
else
{