merchant

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

commit ac9ae0985f47202b77317dbbfea4fd789d724e15
parent dfa69cf100b43ff62896a507e3f2d5092f653bff
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Mon,  7 Mar 2016 14:56:40 +0100

removing double memory free

Diffstat:
Msrc/backend/taler-merchant-httpd.c | 11+++++++++--
Msrc/backend/taler-merchant-httpd_contract.c | 3+++
Msrc/backend/taler-merchant-httpd_parsing.c | 10+++++-----
3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c @@ -561,6 +561,12 @@ run (void *cls, "WIREFORMAT", &wireformat)); + EXITIF (GNUNET_OK != + parse_wireformat_sepa (config)); + EXITIF (GNUNET_OK != + validate_and_hash_wireformat ("SEPA")); + +#if 0 if (0 == strcmp("SEPA", wireformat)) { EXITIF (GNUNET_OK != @@ -575,6 +581,8 @@ run (void *cls, EXITIF (GNUNET_OK != validate_and_hash_wireformat ("TEST")); } +#endif + GNUNET_free (wireformat); EXITIF (GNUNET_OK != @@ -627,8 +635,7 @@ run (void *cls, EXITIF_exit: if (GNUNET_OK != result) GNUNET_SCHEDULER_shutdown (); - GNUNET_free_non_null (wireformat); - GNUNET_free_non_null (keyfile); + if (GNUNET_OK != result) GNUNET_SCHEDULER_shutdown (); } diff --git a/src/backend/taler-merchant-httpd_contract.c b/src/backend/taler-merchant-httpd_contract.c @@ -28,6 +28,8 @@ #include "taler-merchant-httpd_responses.h" +extern char *TMH_merchant_currency_string; + /** * Manage a contract request. In practical terms, it adds the fields * 'exchanges', 'merchant_pub', and 'H_wire' to the contract 'proposition' @@ -51,6 +53,7 @@ MH_handler_contract (struct TMH_RequestHandler *rh, const char *upload_data, size_t *upload_data_size) { + json_t *root; json_t *jcontract; int res; diff --git a/src/backend/taler-merchant-httpd_parsing.c b/src/backend/taler-merchant-httpd_parsing.c @@ -27,10 +27,10 @@ #include "taler-merchant-httpd_responses.h" /* Although the following declaration isn't in any case useful - to a merchant's activity, it's needed here to make the function - 'TMH_PARSE_nagivate_json ()' compile fine; so its value will be - kept on some merchant's accepted currency. For multi currencies - merchants, that of course would require a patch */ +to a merchant's activity, it's needed here to make the function +'TMH_PARSE_nagivate_json ()' compile fine; so its value will be +kept on some merchant's accepted currency. For multi currencies +merchants, that of course would require a patch */ extern char *TMH_merchant_currency_string; /** @@ -534,7 +534,7 @@ int TMH_PARSE_navigate_json (struct MHD_Connection *connection, const json_t *root, ...) -{ +{ va_list argp; int ret; json_t *path; /* what's our current path from 'root'? */