aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjospaeth <spaethj@in.tum.de>2020-09-02 22:06:43 +0200
committerjospaeth <spaethj@in.tum.de>2020-09-02 22:06:43 +0200
commit199bf34cd82d9998baade7197774bf661e8e2cfd (patch)
treea86d9a1aec85dada6c1bfd23df5ad3d4e584a06d
parentc2a7a669d9c014b86d6e046f7d297fc5556d9fd4 (diff)
downloadgnunet-199bf34cd82d9998baade7197774bf661e8e2cfd.tar.gz
gnunet-199bf34cd82d9998baade7197774bf661e8e2cfd.zip
fix GNUNET_ESCROW_cancel()
-rw-r--r--src/escrow/escrow_api.c10
-rw-r--r--src/include/gnunet_escrow_lib.h5
2 files changed, 3 insertions, 12 deletions
diff --git a/src/escrow/escrow_api.c b/src/escrow/escrow_api.c
index 8cbe889d4..3e3496ff1 100644
--- a/src/escrow/escrow_api.c
+++ b/src/escrow/escrow_api.c
@@ -216,7 +216,6 @@ GNUNET_ESCROW_fini (struct GNUNET_ESCROW_Handle *h)
216 /* clean up the operation DLL */ 216 /* clean up the operation DLL */
217 while (NULL != (op = h->op_head)) 217 while (NULL != (op = h->op_head))
218 { 218 {
219 GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op);
220 GNUNET_ESCROW_cancel (op); 219 GNUNET_ESCROW_cancel (op);
221 } 220 }
222 221
@@ -596,8 +595,7 @@ GNUNET_ESCROW_method_number_to_string (enum GNUNET_ESCROW_Key_Escrow_Method meth
596 595
597 596
598/** 597/**
599 * Cancel an escrow operation. Note that the operation MAY still 598 * Cancel an escrow operation.
600 * be executed; this merely cancels the continuation.
601 * 599 *
602 * @param op operation to cancel 600 * @param op operation to cancel
603 */ 601 */
@@ -605,13 +603,11 @@ void
605GNUNET_ESCROW_cancel (struct GNUNET_ESCROW_Operation *op) 603GNUNET_ESCROW_cancel (struct GNUNET_ESCROW_Operation *op)
606{ 604{
607 const struct GNUNET_ESCROW_KeyPluginFunctions *api; 605 const struct GNUNET_ESCROW_KeyPluginFunctions *api;
606 struct GNUNET_ESCROW_Handle *h = op->h;
608 607
609 api = init_plugin (op->h, op->method); 608 api = init_plugin (op->h, op->method);
610 api->cancel_plugin_operation (op->plugin_op_wrap); 609 api->cancel_plugin_operation (op->plugin_op_wrap);
611 // TODO: check which callback is not NULL? 610 GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op);
612 op->cb_put = NULL;
613 op->cb_verify = NULL;
614 op->cb_get = NULL;
615 GNUNET_free (op); 611 GNUNET_free (op);
616} 612}
617 613
diff --git a/src/include/gnunet_escrow_lib.h b/src/include/gnunet_escrow_lib.h
index 64422b1eb..1ede355d0 100644
--- a/src/include/gnunet_escrow_lib.h
+++ b/src/include/gnunet_escrow_lib.h
@@ -225,11 +225,6 @@ struct GNUNET_ESCROW_Operation
225 struct ESCROW_PluginOperationWrapper *plugin_op_wrap; 225 struct ESCROW_PluginOperationWrapper *plugin_op_wrap;
226 226
227 /** 227 /**
228 * The escrow anchor.
229 */
230 struct GNUNET_ESCROW_Anchor *escrow_anchor;
231
232 /**
233 * The ego. 228 * The ego.
234 */ 229 */
235 const struct GNUNET_IDENTITY_Ego *ego; 230 const struct GNUNET_IDENTITY_Ego *ego;