diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-07-05 13:05:58 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-07-05 13:05:58 +0200 |
commit | 9084ac48216876c8a2f9d5a1a78c4b6216676de7 (patch) | |
tree | dcbad31fca661cdb29e0950ea6ad783421a6f86c /src/mint-lib/mint_api_withdraw.c | |
parent | ff6d4c081c4485d007439c1f9132e6718b099e2a (diff) | |
download | exchange-9084ac48216876c8a2f9d5a1a78c4b6216676de7.tar.xz |
fixing RC counting and a comma
Diffstat (limited to 'src/mint-lib/mint_api_withdraw.c')
-rw-r--r-- | src/mint-lib/mint_api_withdraw.c | 33 |
1 files changed, 19 insertions, 14 deletions
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: @@ -1034,6 +1035,10 @@ TALER_MINT_withdraw_sign (struct TALER_MINT_Handle *mint, wsh->url)); GNUNET_assert (CURLE_OK == curl_easy_setopt (eh, + CURLOPT_VERBOSE, + 1LL)); + GNUNET_assert (CURLE_OK == + curl_easy_setopt (eh, CURLOPT_POSTFIELDS, wsh->json_enc)); GNUNET_assert (CURLE_OK == |