diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-06-21 08:25:32 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-06-21 08:25:32 +0200 |
commit | 336159b59453619dfc9cad5e860462c594785dd9 (patch) | |
tree | ee1452c1f1f18f44365a8a4b541280c9d963e4fc /src/gns/gns_api.c | |
parent | 4c7eae3c88bed613fb365920812dc60e0e364ee4 (diff) | |
download | gnunet-336159b59453619dfc9cad5e860462c594785dd9.tar.gz gnunet-336159b59453619dfc9cad5e860462c594785dd9.zip |
make GNS cancel APIs return closure, can be convenient
Diffstat (limited to 'src/gns/gns_api.c')
-rw-r--r-- | src/gns/gns_api.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c index 8264bf715..0ec9209da 100644 --- a/src/gns/gns_api.c +++ b/src/gns/gns_api.c | |||
@@ -300,17 +300,21 @@ GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle) | |||
300 | * Cancel pending lookup request | 300 | * Cancel pending lookup request |
301 | * | 301 | * |
302 | * @param lr the lookup request to cancel | 302 | * @param lr the lookup request to cancel |
303 | * @return closure from the lookup result processor | ||
303 | */ | 304 | */ |
304 | void | 305 | void * |
305 | GNUNET_GNS_lookup_cancel (struct GNUNET_GNS_LookupRequest *lr) | 306 | GNUNET_GNS_lookup_cancel (struct GNUNET_GNS_LookupRequest *lr) |
306 | { | 307 | { |
307 | struct GNUNET_GNS_Handle *handle = lr->gns_handle; | 308 | struct GNUNET_GNS_Handle *handle = lr->gns_handle; |
309 | void *ret; | ||
308 | 310 | ||
309 | GNUNET_CONTAINER_DLL_remove (handle->lookup_head, | 311 | GNUNET_CONTAINER_DLL_remove (handle->lookup_head, |
310 | handle->lookup_tail, | 312 | handle->lookup_tail, |
311 | lr); | 313 | lr); |
312 | GNUNET_MQ_discard (lr->env); | 314 | GNUNET_MQ_discard (lr->env); |
315 | ret = lr->proc_cls; | ||
313 | GNUNET_free (lr); | 316 | GNUNET_free (lr); |
317 | return ret; | ||
314 | } | 318 | } |
315 | 319 | ||
316 | 320 | ||