From 49da00cc2b857708d53fc092c0ff2bef96fe08e1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 4 Jul 2015 21:27:28 +0200 Subject: fix misc small bugs --- src/mint/taler-mint-httpd_responses.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/mint/taler-mint-httpd_responses.c') diff --git a/src/mint/taler-mint-httpd_responses.c b/src/mint/taler-mint-httpd_responses.c index 013cc19b..477db86e 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"); } -- cgit v1.2.3