From 2c05a4b278096a9f222a472c0f022c66ad367059 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 5 May 2017 12:17:48 +0200 Subject: more work on wirewatch --- src/wire/plugin_wire_test.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'src/wire/plugin_wire_test.c') diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index 604a36423..0c14190e7 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -816,23 +816,26 @@ bhist_cb (void *cls, struct TALER_WIRE_HistoryHandle *whh = cls; uint64_t bserial_id = GNUNET_htonll (serial_id); - if (MHD_HTTP_OK == http_status) - whh->hres_cb (whh->hres_cb_cls, - dir, - &bserial_id, - sizeof (bserial_id), - details); + if (MHD_HTTP_OK == http_status) + { + if ( (NULL != whh->hres_cb) && + (GNUNET_OK != + whh->hres_cb (whh->hres_cb_cls, + dir, + &bserial_id, + sizeof (bserial_id), + details)) ) + whh->hres_cb = NULL; + } else - whh->hres_cb (whh->hres_cb_cls, - TALER_BANK_DIRECTION_NONE, - NULL, - 0, - NULL); - if (MHD_HTTP_OK != http_status) { + (void) whh->hres_cb (whh->hres_cb_cls, + TALER_BANK_DIRECTION_NONE, + NULL, + 0, + NULL); whh->hh = NULL; GNUNET_free (whh); - return; } } -- cgit v1.2.3