From: Brian Aker Date: Sun, 20 Jan 2008 01:47:44 +0000 (-0800) Subject: Chicken and Egg problem in clone fixed. X-Git-Tag: 0.14~6^2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=046aefa3092d5be72a23e8d57607565757a103f7;p=awesomized%2Flibmemcached Chicken and Egg problem in clone fixed. --- diff --git a/lib/memcached.c b/lib/memcached.c index 946af6cb..5d89e721 100644 --- a/lib/memcached.c +++ b/lib/memcached.c @@ -60,15 +60,9 @@ memcached_st *memcached_clone(memcached_st *clone, memcached_st *ptr) memcached_return rc= MEMCACHED_SUCCESS; memcached_st *new_clone; + WATCHPOINT; if (ptr == NULL) - { - new_clone= memcached_create(clone); - - if (ptr->on_clone) - ptr->on_clone(NULL, new_clone); - - return new_clone; - } + return memcached_create(clone); if (ptr->is_allocated == MEMCACHED_USED) { @@ -76,6 +70,7 @@ memcached_st *memcached_clone(memcached_st *clone, memcached_st *ptr) return NULL; } + WATCHPOINT; new_clone= memcached_create(clone); if (new_clone == NULL)