summaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_responses.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-07-04 21:27:28 +0200
committerChristian Grothoff <christian@grothoff.org>2015-07-04 21:27:28 +0200
commit49da00cc2b857708d53fc092c0ff2bef96fe08e1 (patch)
treeca3658838d65e723b2d4045b91af1a630906a8e3 /src/mint/taler-mint-httpd_responses.c
parent841950b910efb6c4d5a280363244e5aef63e89fc (diff)
downloadexchange-49da00cc2b857708d53fc092c0ff2bef96fe08e1.tar.gz
exchange-49da00cc2b857708d53fc092c0ff2bef96fe08e1.tar.bz2
exchange-49da00cc2b857708d53fc092c0ff2bef96fe08e1.zip
fix misc small bugs
Diffstat (limited to 'src/mint/taler-mint-httpd_responses.c')
-rw-r--r--src/mint/taler-mint-httpd_responses.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/mint/taler-mint-httpd_responses.c b/src/mint/taler-mint-httpd_responses.c
index 013cc19b8..477db86ed 100644
--- a/src/mint/taler-mint-httpd_responses.c
+++ b/src/mint/taler-mint-httpd_responses.c
@@ -50,11 +50,20 @@ TMH_RESPONSE_reply_json (struct MHD_Connection *connection,
resp = MHD_create_response_from_buffer (strlen (json_str), json_str,
MHD_RESPMEM_MUST_FREE);
if (NULL == resp)
+ {
+ GNUNET_break (0);
return MHD_NO;
+ }
(void) MHD_add_response_header (resp,
MHD_HTTP_HEADER_CONTENT_TYPE,
"application/json");
- ret = MHD_queue_response (connection, response_code, resp);
+ ret = MHD_queue_response (connection,
+ response_code,
+ resp);
+ fprintf (stderr,
+ "Queued response %u (%d)\n",
+ response_code,
+ ret);
MHD_destroy_response (resp);
return ret;
}
@@ -84,7 +93,10 @@ TMH_RESPONSE_reply_json_pack (struct MHD_Connection *connection,
json = json_vpack_ex (NULL, 0, fmt, argp);
va_end (argp);
if (NULL == json)
+ {
+ GNUNET_break (0);
return MHD_NO;
+ }
ret = TMH_RESPONSE_reply_json (connection,
json,
response_code);
@@ -256,7 +268,7 @@ int
TMH_RESPONSE_reply_internal_db_error (struct MHD_Connection *connection)
{
return TMH_RESPONSE_reply_internal_error (connection,
- "Failed to connect to database");
+ "Failed to connect to database");
}