From 046aefa3092d5be72a23e8d57607565757a103f7 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Sat, 19 Jan 2008 17:47:44 -0800 Subject: [PATCH] Chicken and Egg problem in clone fixed. --- lib/memcached.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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) -- 2.30.2