diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-03-09 17:39:17 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-03-09 17:39:17 +0100 |
commit | a3ceef42c217242cfaf21ab8fe2ef1acdbcf7a7f (patch) | |
tree | 7af691ad5eb611b198001f743b5cf6532c7caa4f | |
parent | 2ff1d263081aa338a46660574560dce2b067ae4d (diff) | |
download | merchant-a3ceef42c217242cfaf21ab8fe2ef1acdbcf7a7f.tar.gz merchant-a3ceef42c217242cfaf21ab8fe2ef1acdbcf7a7f.tar.bz2 merchant-a3ceef42c217242cfaf21ab8fe2ef1acdbcf7a7f.zip |
Beginning #4945..
-rw-r--r-- | src/samples/generate_payments.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/samples/generate_payments.c b/src/samples/generate_payments.c index b81ccf60..67f0c79e 100644 --- a/src/samples/generate_payments.c +++ b/src/samples/generate_payments.c @@ -28,12 +28,14 @@ #define EXCHANGE_URI "http://localhost:8081/" -#define MERCHANT_URI "http://localhost:8082" - #define BANK_URI "http://localhost:8083/" #define ORDER_MAX_SIZE 1000 +const char *exchange_uri; + +const char *backend_uri; + /** * Task run on timeout. */ @@ -834,7 +836,7 @@ interpreter_run (void *cls) cmd->details.pay.ph = TALER_MERCHANT_pay_wallet (ctx, - MERCHANT_URI, + backend_uri, "default", &ref->details.proposal.hash, &total_amount, @@ -882,7 +884,7 @@ interpreter_run (void *cls) } cmd->details.proposal.po = TALER_MERCHANT_order_put (ctx, - MERCHANT_URI, + backend_uri, order, &proposal_cb, is); @@ -1457,6 +1459,7 @@ main () struct GNUNET_OS_Process *merchantd; unsigned int cnt; struct GNUNET_SIGNAL_Context *shc_chld; + char *wget_cmd; unsetenv ("XDG_DATA_HOME"); @@ -1566,6 +1569,10 @@ main () fprintf (stderr, "Waiting for taler-merchant-httpd to be ready\n"); cnt = 0; + + GNUNET_asprintf (&wget_cmd, + "wget -q -t 1 -T 1 %s -o /dev/null -O /dev/null", + backend_uri); do { fprintf (stderr, "."); @@ -1586,9 +1593,10 @@ main () return 77; } } - while (0 != system ("wget -q -t 1 -T 1 " MERCHANT_URI " -o /dev/null -O /dev/null")); - fprintf (stderr, "\n"); + while (0 != system (wget_cmd)); + GNUNET_free (wget_cmd); + fprintf (stderr, "\n"); result = GNUNET_SYSERR; sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, GNUNET_NO, GNUNET_NO); |