summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-29 17:01:45 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-29 17:01:45 +0200
commit3e753ff8ab82b959580bd5fc816481dab925a380 (patch)
tree4e8139831a71ca65dc1d7b75be3bd44f49a2f6e1
parenta90e2d2125ed7768300f5b90f35961176006709a (diff)
downloadmerchant-3e753ff8ab82b959580bd5fc816481dab925a380.tar.gz
merchant-3e753ff8ab82b959580bd5fc816481dab925a380.tar.bz2
merchant-3e753ff8ab82b959580bd5fc816481dab925a380.zip
fix segfaults due to use of remote exchange in payment
generator.
-rw-r--r--src/samples/generate_payments.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/samples/generate_payments.c b/src/samples/generate_payments.c
index 7af691ea..4bbe22a0 100644
--- a/src/samples/generate_payments.c
+++ b/src/samples/generate_payments.c
@@ -1684,10 +1684,13 @@ main (int argc,
SIGTERM);
GNUNET_OS_process_wait (merchantd);
GNUNET_OS_process_destroy (merchantd);
- GNUNET_OS_process_kill (exchanged,
- SIGTERM);
- GNUNET_OS_process_wait (exchanged);
- GNUNET_OS_process_destroy (exchanged);
+ if (!remote_exchange)
+ {
+ GNUNET_OS_process_kill (exchanged,
+ SIGTERM);
+ GNUNET_OS_process_wait (exchanged);
+ GNUNET_OS_process_destroy (exchanged);
+ }
if (77 == result)
return 77;
return (GNUNET_OK == result) ? 0 : 1;