projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Fix fatal testing.
[m6w6/libmemcached]
/
libmemcached
/
auto.cc
diff --git
a/libmemcached/auto.cc
b/libmemcached/auto.cc
index 88b921c4cdf889083dd19aaaf9b804d3a3bf57b8..c64ccda45067d79983f9ceae6e72df5804826822 100644
(file)
--- a/
libmemcached/auto.cc
+++ b/
libmemcached/auto.cc
@@
-177,14
+177,9
@@
memcached_return_t memcached_increment_by_key(memcached_st *ptr,
return rc;
}
return rc;
}
- if (memcached_failed(rc= memcached_validate_key_length(key_length, ptr->flags.binary_protocol)))
- {
- return rc;
- }
-
if (memcached_failed(rc= memcached_key_test(*ptr, (const char **)&key, &key_length, 1)))
{
if (memcached_failed(rc= memcached_key_test(*ptr, (const char **)&key, &key_length, 1)))
{
- return
memcached_set_error(*ptr, rc, MEMCACHED_AT)
;
+ return
rc
;
}
uint32_t server_key= memcached_generate_hash_with_redistribution(ptr, group_key, group_key_length);
}
uint32_t server_key= memcached_generate_hash_with_redistribution(ptr, group_key, group_key_length);
@@
-231,7
+226,7
@@
memcached_return_t memcached_decrement_by_key(memcached_st *ptr,
if (memcached_failed(rc= memcached_key_test(*ptr, (const char **)&key, &key_length, 1)))
{
if (memcached_failed(rc= memcached_key_test(*ptr, (const char **)&key, &key_length, 1)))
{
- return
memcached_set_error(*ptr, rc, MEMCACHED_AT)
;
+ return
rc
;
}
}
@@
-296,7
+291,7
@@
memcached_return_t memcached_increment_with_initial_by_key(memcached_st *ptr,
if (memcached_failed(rc= memcached_key_test(*ptr, (const char **)&key, &key_length, 1)))
{
if (memcached_failed(rc= memcached_key_test(*ptr, (const char **)&key, &key_length, 1)))
{
- return
memcached_set_error(*ptr, rc, MEMCACHED_AT)
;
+ return
rc
;
}
uint32_t server_key= memcached_generate_hash_with_redistribution(ptr, group_key, group_key_length);
}
uint32_t server_key= memcached_generate_hash_with_redistribution(ptr, group_key, group_key_length);
@@
-315,7
+310,8
@@
memcached_return_t memcached_increment_with_initial_by_key(memcached_st *ptr,
}
else
{
}
else
{
- rc= MEMCACHED_PROTOCOL_ERROR;
+ rc= memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT,
+ memcached_literal_param("memcached_increment_with_initial_by_key() is not supported via the ASCII protocol"));
}
LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END();
}
LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END();
@@
-360,7
+356,7
@@
memcached_return_t memcached_decrement_with_initial_by_key(memcached_st *ptr,
if (memcached_failed(rc= memcached_key_test(*ptr, (const char **)&key, &key_length, 1)))
{
if (memcached_failed(rc= memcached_key_test(*ptr, (const char **)&key, &key_length, 1)))
{
- return
memcached_set_error(*ptr, rc, MEMCACHED_AT)
;
+ return
rc
;
}
uint32_t server_key= memcached_generate_hash_with_redistribution(ptr, group_key, group_key_length);
}
uint32_t server_key= memcached_generate_hash_with_redistribution(ptr, group_key, group_key_length);
@@
-380,7
+376,8
@@
memcached_return_t memcached_decrement_with_initial_by_key(memcached_st *ptr,
}
else
{
}
else
{
- rc= MEMCACHED_PROTOCOL_ERROR;
+ rc= memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT,
+ memcached_literal_param("memcached_decrement_with_initial_by_key() is not supported via the ASCII protocol"));
}
LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END();
}
LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END();