From: Date: Mon, 17 Mar 2008 04:16:45 +0000 (-0700) Subject: Cleanup for defaults on new connection timeouts. X-Git-Tag: 0.20~1^2~51 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=1c1fa16311aeaad3cb84bf6da3c403b9963ddc44;p=awesomized%2Flibmemcached Cleanup for defaults on new connection timeouts. --- diff --git a/libmemcached/memcached.c b/libmemcached/memcached.c index 31c12ab3..9d0f81e8 100644 --- a/libmemcached/memcached.c +++ b/libmemcached/memcached.c @@ -24,6 +24,8 @@ memcached_st *memcached_create(memcached_st *ptr) result_ptr= memcached_result_create(ptr, &ptr->result); WATCHPOINT_ASSERT(result_ptr); ptr->poll_timeout= MEMCACHED_DEFAULT_TIMEOUT; + ptr->connect_timeout= MEMCACHED_DEFAULT_TIMEOUT; + ptr->retry_timeout= 0; ptr->distribution= MEMCACHED_DISTRIBUTION_MODULA; return ptr; @@ -89,6 +91,8 @@ memcached_st *memcached_clone(memcached_st *clone, memcached_st *ptr) new_clone->send_size= ptr->send_size; new_clone->recv_size= ptr->recv_size; new_clone->poll_timeout= ptr->poll_timeout; + new_clone->connect_timeout= ptr->connect_timeout; + new_clone->retry_timeout= ptr->retry_timeout; new_clone->distribution= ptr->distribution; new_clone->hash= ptr->hash; new_clone->user_data= ptr->user_data; diff --git a/libmemcached/memcached_connect.c b/libmemcached/memcached_connect.c index ab4b84f0..7edcce85 100644 --- a/libmemcached/memcached_connect.c +++ b/libmemcached/memcached_connect.c @@ -210,6 +210,7 @@ test_connect: { ptr->cached_errno= errno; WATCHPOINT_ERRNO(ptr->cached_errno); + WATCHPOINT_NUMBER(ptr->root->connect_timeout); close(ptr->fd); ptr->fd= -1; return MEMCACHED_ERRNO; diff --git a/libmemcached/murmur_hash.c b/libmemcached/murmur_hash.c index e673420d..7cfcaa9e 100644 --- a/libmemcached/murmur_hash.c +++ b/libmemcached/murmur_hash.c @@ -28,7 +28,6 @@ uint32_t murmur_hash(char *key, size_t length) case 2: k += key[1] << 8; case 1: k += key[0]; MIX(h,k,m); - default: }; h *= m;