From da75b30a258e35d6256aa8d61a0b729ae5c4c896 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 5 May 2017 11:11:03 +0200 Subject: starting to implement taler-exchange-wirewatch --- src/wire/plugin_wire_sepa.c | 4 +++- src/wire/plugin_wire_template.c | 4 +++- src/wire/plugin_wire_test.c | 23 +++++++++++++++-------- 3 files changed, 21 insertions(+), 10 deletions(-) (limited to 'src/wire') diff --git a/src/wire/plugin_wire_sepa.c b/src/wire/plugin_wire_sepa.c index 5baa3eaba..6300d8205 100644 --- a/src/wire/plugin_wire_sepa.c +++ b/src/wire/plugin_wire_sepa.c @@ -772,10 +772,12 @@ sepa_get_history (void *cls, /** * Cancel going over the account's history. * + * @param cls the @e cls of this struct with the plugin-specific state * @param whh operation to cancel */ static void -sepa_get_history_cancel (struct TALER_WIRE_HistoryHandle *whh) +sepa_get_history_cancel (void *cls, + struct TALER_WIRE_HistoryHandle *whh) { GNUNET_break (0); } diff --git a/src/wire/plugin_wire_template.c b/src/wire/plugin_wire_template.c index e94b2f05b..c4eefd194 100644 --- a/src/wire/plugin_wire_template.c +++ b/src/wire/plugin_wire_template.c @@ -256,10 +256,12 @@ template_get_history (void *cls, /** * Cancel going over the account's history. * + * @param cls the @e cls of this struct with the plugin-specific state * @param whh operation to cancel */ static void -template_get_history_cancel (struct TALER_WIRE_HistoryHandle *whh) +template_get_history_cancel (void *cls, + struct TALER_WIRE_HistoryHandle *whh) { GNUNET_break (0); } diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index b034fea80..604a36423 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -816,13 +816,18 @@ bhist_cb (void *cls, struct TALER_WIRE_HistoryHandle *whh = cls; uint64_t bserial_id = GNUNET_htonll (serial_id); - whh->hres_cb (whh->hres_cb_cls, - http_status, - dir, - &bserial_id, - sizeof (bserial_id), - details, - json); + if (MHD_HTTP_OK == http_status) + whh->hres_cb (whh->hres_cb_cls, + dir, + &bserial_id, + sizeof (bserial_id), + details); + else + whh->hres_cb (whh->hres_cb_cls, + TALER_BANK_DIRECTION_NONE, + NULL, + 0, + NULL); if (MHD_HTTP_OK != http_status) { whh->hh = NULL; @@ -917,10 +922,12 @@ test_get_history (void *cls, /** * Cancel going over the account's history. * + * @param cls the @e cls of this struct with the plugin-specific state * @param whh operation to cancel */ static void -test_get_history_cancel (struct TALER_WIRE_HistoryHandle *whh) +test_get_history_cancel (void *cls, + struct TALER_WIRE_HistoryHandle *whh) { TALER_BANK_history_cancel (whh->hh); GNUNET_free (whh); -- cgit v1.2.3