diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-09 01:15:49 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-09 01:15:49 +0200 |
commit | 00658a93f1d26ccb7ba5f10f31055531564a6523 (patch) | |
tree | 3a55a55d3f909e9cd9770b376714bd0c9a420fc2 /src/backend/taler-merchant-httpd_pay.c | |
parent | 549fec36b9d28d1b49d26ffcbb099f41f42b8ce6 (diff) | |
download | merchant-00658a93f1d26ccb7ba5f10f31055531564a6523.tar.gz merchant-00658a93f1d26ccb7ba5f10f31055531564a6523.tar.bz2 merchant-00658a93f1d26ccb7ba5f10f31055531564a6523.zip |
make code compile without warnings against latest libmicrohttpd API
Diffstat (limited to 'src/backend/taler-merchant-httpd_pay.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_pay.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/backend/taler-merchant-httpd_pay.c b/src/backend/taler-merchant-httpd_pay.c index 8b255f07..de651020 100644 --- a/src/backend/taler-merchant-httpd_pay.c +++ b/src/backend/taler-merchant-httpd_pay.c @@ -1456,7 +1456,7 @@ check_coin_paid (void *cls, * #GNUNET_NO on failure (response was queued with MHD) * #GNUNET_SYSERR on hard error (MHD connection must be dropped) */ -static int +static enum GNUNET_GenericReturnValue parse_pay (struct MHD_Connection *connection, const json_t *root, struct PayContext *pc) @@ -1465,7 +1465,7 @@ parse_pay (struct MHD_Connection *connection, const char *order_id; const char *mode; struct TALER_MerchantPublicKeyP merchant_pub; - int res; + enum GNUNET_GenericReturnValue res; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_string ("mode", &mode), @@ -2167,13 +2167,13 @@ begin_transaction (struct PayContext *pc) * @return value to return to MHD (#MHD_NO to drop connection, * #MHD_YES to keep handling it) */ -static int +static MHD_RESULT handler_pay_json (struct MHD_Connection *connection, const json_t *root, struct PayContext *pc) { { - int ret; + enum GNUNET_GenericReturnValue ret; ret = parse_pay (connection, root, @@ -2209,7 +2209,7 @@ handler_pay_json (struct MHD_Connection *connection, * @param mi merchant backend instance, never NULL * @return MHD result code */ -int +MHD_RESULT MH_handler_pay (struct TMH_RequestHandler *rh, struct MHD_Connection *connection, void **connection_cls, @@ -2218,7 +2218,8 @@ MH_handler_pay (struct TMH_RequestHandler *rh, struct MerchantInstance *mi) { struct PayContext *pc; - int res; + enum GNUNET_GenericReturnValue res; + MHD_RESULT ret; json_t *root; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -2282,11 +2283,11 @@ MH_handler_pay (struct TMH_RequestHandler *rh, (NULL == root) ) return MHD_YES; /* the POST's body has to be further fetched */ - res = handler_pay_json (connection, + ret = handler_pay_json (connection, root, pc); json_decref (root); - return res; + return ret; } |