projects
/
m6w6
/
libmemcached
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
f10c3a3
)
Added message processing callback call upon message reading within memcached_purge
author
Jean-Charles Redoutey
<jc@Jayce2009lnx>
Mon, 30 Nov 2009 20:48:43 +0000
(21:48 +0100)
committer
Jean-Charles Redoutey
<jc@Jayce2009lnx>
Mon, 30 Nov 2009 20:48:43 +0000
(21:48 +0100)
libmemcached/memcached_purge.c
patch
|
blob
|
history
diff --git
a/libmemcached/memcached_purge.c
b/libmemcached/memcached_purge.c
index 9e5e31aba04e3f9d1416b15794ab35ea6067883d..7485da33d343bcacb046f2a6d5153e323605b201 100644
(file)
--- 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);