merchant

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

commit 70765db54c9fd0690e9a0865b244a3c0e5014ff4
parent 002bae744c7307fb86d7ff52f62be5b9a1d85a31
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Sat, 22 Apr 2017 16:50:23 +0200

fix segfaults caused by the way the payment generator
killed merchants and exchanges.

Diffstat:
Msrc/samples/generate_payments.c | 16+++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/samples/generate_payments.c b/src/samples/generate_payments.c @@ -598,6 +598,9 @@ add_incoming_cb (void *cls, if (MHD_HTTP_OK != http_status) { GNUNET_break (0); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "%s", + json_dumps (full_response, JSON_INDENT (2))); fail (is); return; } @@ -1693,11 +1696,14 @@ main (int argc, GNUNET_SIGNAL_handler_uninstall (shc_chld); shc_chld = NULL; GNUNET_DISK_pipe_close (sigpipe); - GNUNET_OS_process_kill (merchantd, - SIGTERM); - GNUNET_OS_process_wait (merchantd); - GNUNET_OS_process_destroy (merchantd); - if (!remote_exchange) + if (NULL != merchantd) + { + GNUNET_OS_process_kill (merchantd, + SIGTERM); + GNUNET_OS_process_wait (merchantd); + GNUNET_OS_process_destroy (merchantd); + } + if (!remote_exchange && NULL != exchanged) { GNUNET_OS_process_kill (exchanged, SIGTERM);