projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge trunk.
[awesomized/libmemcached]
/
libmemcached
/
hosts.cc
diff --git
a/libmemcached/hosts.cc
b/libmemcached/hosts.cc
index db6398914a699472d6163c3d4327b9f882e93055..89896e85c50a1071315eb9ce39749920eff25bbd 100644
(file)
--- a/
libmemcached/hosts.cc
+++ b/
libmemcached/hosts.cc
@@
-246,7
+246,8
@@
static memcached_return_t update_continuum(memcached_st *ptr)
if (sort_host_length >= MEMCACHED_MAX_HOST_SORT_LENGTH || sort_host_length < 0)
{
if (sort_host_length >= MEMCACHED_MAX_HOST_SORT_LENGTH || sort_host_length < 0)
{
- return MEMCACHED_FAILURE;
+ return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT,
+ memcached_literal_param("snprintf(MEMCACHED_DEFAULT_COMMAND_SIZE)"));
}
#ifdef DEBUG
printf("update_continuum: key is %s\n", sort_host);
}
#ifdef DEBUG
printf("update_continuum: key is %s\n", sort_host);
@@
-298,7
+299,8
@@
static memcached_return_t update_continuum(memcached_st *ptr)
if (sort_host_length >= MEMCACHED_MAX_HOST_SORT_LENGTH || sort_host_length < 0)
{
if (sort_host_length >= MEMCACHED_MAX_HOST_SORT_LENGTH || sort_host_length < 0)
{
- return MEMCACHED_FAILURE;
+ return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT,
+ memcached_literal_param("snprintf(MEMCACHED_DEFAULT_COMMAND_SIZE)"));
}
WATCHPOINT_ASSERT(sort_host_length);
}
WATCHPOINT_ASSERT(sort_host_length);