diff options
Diffstat (limited to 'src/tools/cbr/cbr_client.c')
-rw-r--r-- | src/tools/cbr/cbr_client.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/tools/cbr/cbr_client.c b/src/tools/cbr/cbr_client.c index b0c04f39..1cc325b8 100644 --- a/src/tools/cbr/cbr_client.c +++ b/src/tools/cbr/cbr_client.c @@ -35,7 +35,12 @@ static void busy_wait_until(const struct timespec * deadline) clock_gettime(CLOCK_REALTIME, &now); } -int client_main(int duration, int size, long rate, bool flood, bool sleep) +int client_main(char * server, + int duration, + int size, + long rate, + bool flood, + bool sleep) { int fd = 0; int result = 0; @@ -49,15 +54,10 @@ int client_main(int duration, int size, long rate, bool flood, bool sleep) struct timespec intv = {(gap / BILLION), gap % BILLION}; int ms; - if (ap_init(CLIENT_AP_NAME)) { - printf("Failed to init AP.\n"); - return -1; - } - printf("Client started, duration %d, rate %lu b/s, size %d B.\n", duration, rate, size); - fd = flow_alloc(SERVER_AP_NAME, NULL, NULL); + fd = flow_alloc(server, NULL, NULL); if (fd < 0) { printf("Failed to allocate flow.\n"); ap_fini(); @@ -122,7 +122,5 @@ int client_main(int duration, int size, long rate, bool flood, bool sleep) flow_dealloc(fd); - ap_fini(); - return 0; } |