From: Date: Mon, 18 Feb 2008 05:57:41 +0000 (+0530) Subject: All behavior changes should not require a flush. X-Git-Tag: _20~13 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=51122913775a22e21bc159e53c9849050137df55;p=m6w6%2Flibmemcached All behavior changes should not require a flush. --- diff --git a/lib/memcached_behavior.c b/lib/memcached_behavior.c index 42eacba9..1e25390d 100644 --- a/lib/memcached_behavior.c +++ b/lib/memcached_behavior.c @@ -13,7 +13,6 @@ void set_behavior_flag(memcached_st *ptr, memcached_flags temp_flag, void *data) { unsigned int truefalse= *(unsigned int *)data; - memcached_quit(ptr); if (truefalse) ptr->flags|= temp_flag; else @@ -31,11 +30,14 @@ memcached_return memcached_behavior_set(memcached_st *ptr, break; case MEMCACHED_BEHAVIOR_NO_BLOCK: set_behavior_flag(ptr, MEM_NO_BLOCK, data); + memcached_quit(ptr); case MEMCACHED_BEHAVIOR_BUFFER_REQUESTS: set_behavior_flag(ptr, MEM_BUFFER_REQUESTS, data); + memcached_quit(ptr); break; case MEMCACHED_BEHAVIOR_TCP_NODELAY: set_behavior_flag(ptr, MEM_TCP_NODELAY, data); + memcached_quit(ptr); break; case MEMCACHED_BEHAVIOR_DISTRIBUTION: ptr->distribution= *(memcached_server_distribution *)(data); @@ -45,6 +47,7 @@ memcached_return memcached_behavior_set(memcached_st *ptr, break; case MEMCACHED_BEHAVIOR_CACHE_LOOKUPS: set_behavior_flag(ptr, MEM_USE_CACHE_LOOKUPS, data); + memcached_quit(ptr); break; case MEMCACHED_BEHAVIOR_VERIFY_KEY: set_behavior_flag(ptr, MEM_VERIFY_KEY, data);