summaryrefslogtreecommitdiff
path: root/src/mint-lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/mint-lib')
-rw-r--r--src/mint-lib/mint_api_withdraw.c33
-rw-r--r--src/mint-lib/test_mint_api.c5
2 files changed, 21 insertions, 17 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 ==
diff --git a/src/mint-lib/test_mint_api.c b/src/mint-lib/test_mint_api.c
index 6d8e0638d..8d206970d 100644
--- a/src/mint-lib/test_mint_api.c
+++ b/src/mint-lib/test_mint_api.c
@@ -358,6 +358,7 @@ add_incoming_cb (void *cls,
cmd->details.admin_add_incoming.aih = NULL;
if (MHD_HTTP_OK != http_status)
{
+ GNUNET_break (0);
fail (is);
return;
}
@@ -385,12 +386,10 @@ withdraw_sign_cb (void *cls,
struct InterpreterState *is = cls;
struct Command *cmd = &is->commands[is->ip];
- fprintf (stderr,
- "Withdraw completed: %u\n",
- http_status);
cmd->details.withdraw_sign.wsh = NULL;
if (NULL == sig)
{
+ GNUNET_break (0);
fail (is);
return;
}