summaryrefslogtreecommitdiff
path: root/src/mint-lib/mint_api_withdraw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mint-lib/mint_api_withdraw.c')
-rw-r--r--src/mint-lib/mint_api_withdraw.c33
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 ==