merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit a0913b87fe49e8ea16fc3608e32bb8ccd7b3940b
parent 835a95d7f5e5d3b685bfe0bf5c26ac717218edd6
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Mon, 12 Dec 2016 18:16:34 +0100

Add proper response for /map/in

Diffstat:
Msrc/backend/taler-merchant-httpd_map.c | 11+++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_map.c b/src/backend/taler-merchant-httpd_map.c @@ -85,6 +85,7 @@ MH_handler_map_in (struct TMH_RequestHandler *rh, struct GNUNET_HashCode h_contract; struct GNUNET_HashCode tmp; struct TMH_JsonParseContext *ctx; + struct MHD_Response *response; /* Fetch body */ @@ -167,14 +168,8 @@ MH_handler_map_in (struct TMH_RequestHandler *rh, "Could not store data into db"); } - /* Test */ - json_t *hello; - - hello = json_pack ("{s:s}", "ok", "computer"); - return TMH_RESPONSE_reply_json (connection, - hello, - MHD_HTTP_OK); - + response = MHD_create_response_from_buffer (0, NULL, MHD_RESPMEM_PERSISTENT); + return MHD_queue_response (connection, MHD_HTTP_OK, response); }