X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=libmemcached%2Fmemcached.c;h=2fa4f42ce940cd4a19dd369851d0bc78d80eff86;hb=8fd8f655540e3d6aa0b0a3eb0f4f7df1be2e6542;hp=a363c2498351435a0f639911e35478144f5a211f;hpb=b4de8d3fd063b9017797dd9809ab3acb8a537606;p=m6w6%2Flibmemcached diff --git a/libmemcached/memcached.c b/libmemcached/memcached.c index a363c249..2fa4f42c 100644 --- a/libmemcached/memcached.c +++ b/libmemcached/memcached.c @@ -39,7 +39,6 @@ memcached_st *memcached_create(memcached_st *ptr) ptr->io_bytes_watermark= 65 * 1024; WATCHPOINT_ASSERT_INITIALIZED(&ptr->result); - WATCHPOINT_ASSERT_INITIALIZED(&ptr->hashkit); return ptr; } @@ -98,7 +97,7 @@ memcached_st *memcached_clone(memcached_st *clone, memcached_st *source) new_clone->retry_timeout= source->retry_timeout; new_clone->distribution= source->distribution; new_clone->hash= source->hash; - new_clone->hash_continuum= source->hash_continuum; + new_clone->distribution_hash= source->distribution_hash; new_clone->user_data= source->user_data; new_clone->snd_timeout= source->snd_timeout; @@ -136,6 +135,7 @@ memcached_st *memcached_clone(memcached_st *clone, memcached_st *source) } rc= run_distribution(new_clone); + if (rc != MEMCACHED_SUCCESS) { memcached_free(new_clone); @@ -148,6 +148,7 @@ memcached_st *memcached_clone(memcached_st *clone, memcached_st *source) return new_clone; } + void *memcached_get_user_data(memcached_st *ptr) { return ptr->user_data; @@ -157,5 +158,6 @@ void *memcached_set_user_data(memcached_st *ptr, void *data) { void *ret= ptr->user_data; ptr->user_data= data; + return ret; }