From 9084ac48216876c8a2f9d5a1a78c4b6216676de7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 5 Jul 2015 13:05:58 +0200 Subject: fixing RC counting and a comma --- src/mint-lib/mint_api_withdraw.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'src/mint-lib/mint_api_withdraw.c') diff --git a/src/mint-lib/mint_api_withdraw.c b/src/mint-lib/mint_api_withdraw.c index a7c302c75..1b13a0d9a 100644 --- a/src/mint-lib/mint_api_withdraw.c +++ b/src/mint-lib/mint_api_withdraw.c @@ -36,7 +36,7 @@ */ #define JSON_WARN(error) \ GNUNET_log (GNUNET_ERROR_TYPE_WARNING, \ - "JSON parsing failed at %s:%u: %s (%s)", \ + "JSON parsing failed at %s:%u: %s (%s)\n", \ __FILE__, __LINE__, error.text, error.source) @@ -800,7 +800,20 @@ handle_withdraw_sign_finished (void *cls, wsh->job = NULL; json = NULL; - if (0 == wsh->eno) + if (CURLE_OK != + curl_easy_getinfo (eh, + CURLINFO_RESPONSE_CODE, + &response_code)) + { + /* unexpected error... */ + GNUNET_break (0); + response_code = 0; + } + fprintf (stderr, + "Response code: %u\n", + (unsigned int) response_code); + if ( (0 == wsh->eno) && + (0 != response_code) ) { json = json_loadb (wsh->buf, wsh->buf_size, @@ -812,18 +825,6 @@ handle_withdraw_sign_finished (void *cls, response_code = 0; } } - if (NULL != json) - { - if (CURLE_OK != - curl_easy_getinfo (eh, - CURLINFO_RESPONSE_CODE, - &response_code)) - { - /* unexpected error... */ - GNUNET_break (0); - response_code = 0; - } - } switch (response_code) { case 0: @@ -1032,6 +1033,10 @@ TALER_MINT_withdraw_sign (struct TALER_MINT_Handle *mint, curl_easy_setopt (eh, CURLOPT_URL, wsh->url)); + GNUNET_assert (CURLE_OK == + curl_easy_setopt (eh, + CURLOPT_VERBOSE, + 1LL)); GNUNET_assert (CURLE_OK == curl_easy_setopt (eh, CURLOPT_POSTFIELDS, -- cgit v1.2.3