commit 0390a2244d027467193dcfb1ccf70f5866c7cc3e
parent 6004b808cd65c2e7bc99423d3c58d23d58995eb6
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 14 May 2017 15:34:28 +0200
fix #5008
Diffstat:
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_exchanges.c b/src/backend/taler-merchant-httpd_exchanges.c
@@ -448,6 +448,11 @@ process_find_operations (struct Exchange *exchange)
wire_fee,
exchange->trusted);
GNUNET_free_non_null (fo->wire_method);
+ if (NULL != fo->at)
+ {
+ GNUNET_SCHEDULER_cancel (fo->at);
+ fo->at = NULL;
+ }
GNUNET_free (fo);
}
return need_wire;
@@ -522,6 +527,11 @@ handle_wire_data (void *cls,
NULL,
GNUNET_NO);
GNUNET_free_non_null (fo->wire_method);
+ if (NULL != fo->at)
+ {
+ GNUNET_SCHEDULER_cancel (fo->at);
+ fo->at = NULL;
+ }
GNUNET_free (fo);
}
return;
@@ -647,6 +657,7 @@ return_result (void *cls)
struct TMH_EXCHANGES_FindOperation *fo = cls;
struct Exchange *exchange = fo->my_exchange;
+ fo->at = NULL;
if ( (GNUNET_YES ==
process_find_operations (exchange)) &&
(NULL == exchange->wire_request) &&
@@ -742,6 +753,7 @@ TMH_EXCHANGES_find_exchange (const char *chosen_exchange,
{
/* We are not currently waiting for a reply, immediately
return result */
+ GNUNET_assert (NULL == fo->at);
fo->at = GNUNET_SCHEDULER_add_now (&return_result,
fo);
return fo;