summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_loop.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-19 15:38:44 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-19 15:38:44 +0100
commit42ef95d002637150bbb294d2e4e69504b2b7bb7c (patch)
treeb2d49c5dd66b3f7e69e9f17eeb65d8209f7a9a85 /src/testing/testing_api_loop.c
parentfdd8d602ba755c5a3c98e01ac890b969567d5374 (diff)
downloadexchange-42ef95d002637150bbb294d2e4e69504b2b7bb7c.tar.gz
exchange-42ef95d002637150bbb294d2e4e69504b2b7bb7c.tar.bz2
exchange-42ef95d002637150bbb294d2e4e69504b2b7bb7c.zip
duplicate code elimination
Diffstat (limited to 'src/testing/testing_api_loop.c')
-rw-r--r--src/testing/testing_api_loop.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index a7a5a23a4..61b95c2e1 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -124,20 +124,7 @@ TALER_TESTING_run_with_fakebank (struct TALER_TESTING_Interpreter *is,
struct TALER_TESTING_Command *commands,
const char *bank_url)
{
- const char *port;
- long pnum;
-
- port = strrchr (bank_url,
- (unsigned char) ':');
- if (NULL == port)
- pnum = 80;
- else
- pnum = strtol (port + 1, NULL, 10);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Starting Fakebank on port %u (%s)\n",
- (unsigned int) pnum,
- bank_url);
- is->fakebank = TALER_FAKEBANK_start ((uint16_t) pnum);
+ is->fakebank = TALER_TESTING_run_fakebank (bank_url);
if (NULL == is->fakebank)
{
GNUNET_break (0);