projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Fix for decrement
[awesomized/libmemcached]
/
libmemcached
/
memcached_callback.c
diff --git
a/libmemcached/memcached_callback.c
b/libmemcached/memcached_callback.c
index 52afbb947117f37b55e0db5a427a832b6860fe60..d1c042429b4d5fd4569a98a649f0ede6f2ac957f 100644
(file)
--- a/
libmemcached/memcached_callback.c
+++ b/
libmemcached/memcached_callback.c
@@
-21,15
+21,21
@@
memcached_return memcached_callback_set(memcached_st *ptr,
{
size_t key_length= strlen(key);
{
size_t key_length= strlen(key);
- if ((ptr->flags & MEM_VERIFY_KEY) && (memcachd_key_test((char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
+ if (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
{