diff options
Diffstat (limited to 'src/bank-lib/taler-exchange-wire-gateway-client.c')
-rw-r--r-- | src/bank-lib/taler-exchange-wire-gateway-client.c | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/src/bank-lib/taler-exchange-wire-gateway-client.c b/src/bank-lib/taler-exchange-wire-gateway-client.c index 935506f71..c69c32c47 100644 --- a/src/bank-lib/taler-exchange-wire-gateway-client.c +++ b/src/bank-lib/taler-exchange-wire-gateway-client.c | |||
@@ -181,10 +181,20 @@ credit_history_cb (void *cls, | |||
181 | (TALER_EC_NONE != ec) || | 181 | (TALER_EC_NONE != ec) || |
182 | (NULL == details) ) | 182 | (NULL == details) ) |
183 | { | 183 | { |
184 | fprintf (stderr, | 184 | if (0 == http_status) |
185 | "Failed to obtain credit history: %u/%d\n", | 185 | { |
186 | http_status, | 186 | fprintf (stderr, |
187 | ec); | 187 | "Failed to obtain HTTP reply from `%s'\n", |
188 | auth.wire_gateway_url); | ||
189 | } | ||
190 | else | ||
191 | { | ||
192 | fprintf (stderr, | ||
193 | "Failed to obtain credit history from `%s': HTTP status %u (%s)\n", | ||
194 | auth.wire_gateway_url, | ||
195 | http_status, | ||
196 | TALER_ErrorCode_get_hint (ec)); | ||
197 | } | ||
188 | if (NULL != json) | 198 | if (NULL != json) |
189 | json_dumpf (json, | 199 | json_dumpf (json, |
190 | stderr, | 200 | stderr, |
@@ -277,16 +287,27 @@ debit_history_cb (void *cls, | |||
277 | { | 287 | { |
278 | (void) cls; | 288 | (void) cls; |
279 | 289 | ||
290 | dhh = NULL; | ||
280 | if (MHD_HTTP_OK != http_status) | 291 | if (MHD_HTTP_OK != http_status) |
281 | { | 292 | { |
282 | if ( (MHD_HTTP_NO_CONTENT != http_status) || | 293 | if ( (MHD_HTTP_NO_CONTENT != http_status) || |
283 | (TALER_EC_NONE != ec) || | 294 | (TALER_EC_NONE != ec) || |
284 | (NULL == details) ) | 295 | (NULL == details) ) |
285 | { | 296 | { |
286 | fprintf (stderr, | 297 | if (0 == http_status) |
287 | "Failed to obtain debit history: %u/%d\n", | 298 | { |
288 | http_status, | 299 | fprintf (stderr, |
289 | ec); | 300 | "Failed to obtain HTTP reply from `%s'\n", |
301 | auth.wire_gateway_url); | ||
302 | } | ||
303 | else | ||
304 | { | ||
305 | fprintf (stderr, | ||
306 | "Failed to obtain debit history from `%s': HTTP status %u (%s)\n", | ||
307 | auth.wire_gateway_url, | ||
308 | http_status, | ||
309 | TALER_ErrorCode_get_hint (ec)); | ||
310 | } | ||
290 | if (NULL != json) | 311 | if (NULL != json) |
291 | json_dumpf (json, | 312 | json_dumpf (json, |
292 | stderr, | 313 | stderr, |