From: Jean-Charles Redoutey Date: Mon, 30 Nov 2009 20:48:43 +0000 (+0100) Subject: Added message processing callback call upon message reading within memcached_purge X-Git-Tag: 0.40~123^2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=4a9ec05b1436e22230bc6220b2e5ce85e046572d;p=m6w6%2Flibmemcached Added message processing callback call upon message reading within memcached_purge --- diff --git a/libmemcached/memcached_purge.c b/libmemcached/memcached_purge.c index 9e5e31ab..7485da33 100644 --- a/libmemcached/memcached_purge.c +++ b/libmemcached/memcached_purge.c @@ -65,6 +65,20 @@ memcached_return memcached_purge(memcached_server_st *ptr) ret = rc; memcached_io_reset(ptr); } + + if (ptr->root->callbacks != NULL) + { + memcached_callback_st cb = *ptr->root->callbacks; + if (rc == MEMCACHED_SUCCESS) + { + for (unsigned int y = 0; y < cb.number_of_callback; y++) + { + rc = (*cb.callback[y])(ptr->root, result_ptr, cb.context); + if (rc != MEMCACHED_SUCCESS) + break; + } + } + } } memcached_result_free(result_ptr);