X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=lib%2Fmemcached.c;h=30099c39ff7a2f643f2edd9caaaddb0ee5b0d979;hb=3bd95102380ff8d9f2599f0965c09776344d0691;hp=b474ca5d1ab0cd2253317ded470c096cc878c596;hpb=fdd0e00773ce7928205f725ba5319c94744471a0;p=m6w6%2Flibmemcached diff --git a/lib/memcached.c b/lib/memcached.c index b474ca5d..30099c39 100644 --- a/lib/memcached.c +++ b/lib/memcached.c @@ -22,8 +22,8 @@ memcached_st *memcached_create(memcached_st *ptr) } string_ptr= memcached_string_create(ptr, &ptr->result_buffer, 0); WATCHPOINT_ASSERT(string_ptr); - ptr->poll_timeout= -1; - ptr->distribution= MEMCACHED_DISTRIBUTION_MODULO; + ptr->poll_timeout= MEMCACHED_DEFAULT_TIMEOUT; + ptr->distribution= MEMCACHED_DISTRIBUTION_MODULA; return ptr; } @@ -48,7 +48,7 @@ void memcached_free(memcached_st *ptr) */ memcached_st *memcached_clone(memcached_st *clone, memcached_st *ptr) { - memcached_return rc; + memcached_return rc= MEMCACHED_SUCCESS; memcached_st *new_clone; if (ptr == NULL) @@ -81,6 +81,7 @@ memcached_st *memcached_clone(memcached_st *clone, memcached_st *ptr) new_clone->recv_size= ptr->recv_size; new_clone->poll_timeout= ptr->poll_timeout; new_clone->distribution= ptr->distribution; + new_clone->hash= ptr->hash; return new_clone; }