From 199bf34cd82d9998baade7197774bf661e8e2cfd Mon Sep 17 00:00:00 2001 From: jospaeth Date: Wed, 2 Sep 2020 22:06:43 +0200 Subject: fix GNUNET_ESCROW_cancel() --- src/escrow/escrow_api.c | 10 +++------- src/include/gnunet_escrow_lib.h | 5 ----- 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) /* clean up the operation DLL */ while (NULL != (op = h->op_head)) { - GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op); GNUNET_ESCROW_cancel (op); } @@ -596,8 +595,7 @@ GNUNET_ESCROW_method_number_to_string (enum GNUNET_ESCROW_Key_Escrow_Method meth /** - * Cancel an escrow operation. Note that the operation MAY still - * be executed; this merely cancels the continuation. + * Cancel an escrow operation. * * @param op operation to cancel */ @@ -605,13 +603,11 @@ void GNUNET_ESCROW_cancel (struct GNUNET_ESCROW_Operation *op) { const struct GNUNET_ESCROW_KeyPluginFunctions *api; + struct GNUNET_ESCROW_Handle *h = op->h; api = init_plugin (op->h, op->method); api->cancel_plugin_operation (op->plugin_op_wrap); - // TODO: check which callback is not NULL? - op->cb_put = NULL; - op->cb_verify = NULL; - op->cb_get = NULL; + GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op); GNUNET_free (op); } 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 @@ -224,11 +224,6 @@ struct GNUNET_ESCROW_Operation */ struct ESCROW_PluginOperationWrapper *plugin_op_wrap; - /** - * The escrow anchor. - */ - struct GNUNET_ESCROW_Anchor *escrow_anchor; - /** * The ego. */ -- cgit v1.2.3