Cleanup for defaults on new connection timeouts.
author <brian@gir.tangent.org> <>
Mon, 17 Mar 2008 04:16:45 +0000 (21:16 -0700)
committer <brian@gir.tangent.org> <>
Mon, 17 Mar 2008 04:16:45 +0000 (21:16 -0700)
libmemcached/memcached.c
libmemcached/memcached_connect.c
libmemcached/murmur_hash.c

index 31c12ab3158bc52af7665376171816157f27e3c5..9d0f81e8b31d200be1bf6591f7149393e0625150 100644 (file)
@@ -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;
index ab4b84f0936d588cac7fe7671d25647742727809..7edcce8565925da6cdc63a53e4ab161823eb45ed 100644 (file)
@@ -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;
index e673420d4643a13c5cc7e42910083431999b6cda..7cfcaa9eba087559de5c2d371f85bec615c6c460 100644 (file)
@@ -28,7 +28,6 @@ uint32_t murmur_hash(char *key, size_t length)
   case 2: k += key[1] << 8;\r
   case 1: k += key[0];\r
           MIX(h,k,m);\r
-  default:\r
   };\r
 \r
   h *= m;\r