From 25762246461186b92b71d256e098e0a7640875f1 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Tue, 6 Jun 2017 15:16:15 +0200 Subject: tests updated --- code/test/server.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'code/test/server.c') diff --git a/code/test/server.c b/code/test/server.c index 71ec2ef..a83c1c5 100644 --- a/code/test/server.c +++ b/code/test/server.c @@ -29,14 +29,14 @@ ssize_t handle_msg_s(ECPConnection *conn, unsigned char t, unsigned char *p, ssi } static void usage(char *arg) { - fprintf(stderr, "Usage: %s [address]\n", arg); + fprintf(stderr, "Usage: %s
\n", arg); exit(1); } int main(int argc, char *argv[]) { int rv; - if (argc != 2) usage(argv[0]); + if (argc != 3) usage(argv[0]); rv = ecp_init(&ctx_s); printf("ecp_init RV:%d\n", rv); @@ -45,13 +45,13 @@ int main(int argc, char *argv[]) { handler_s.msg[MTYPE_MSG] = handle_msg_s; ctx_s.handler[CTYPE_TEST] = &handler_s; - rv = ecp_util_key_load(&ctx_s, &key_perma_s, argv[1]); + rv = ecp_util_key_load(&ctx_s, &key_perma_s, argv[2]); printf("ecp_util_key_load RV:%d\n", rv); rv = ecp_sock_create(&sock_s, &ctx_s, &key_perma_s); printf("ecp_sock_create RV:%d\n", rv); - rv = ecp_sock_open(&sock_s, "0.0.0.0:3000"); + rv = ecp_sock_open(&sock_s, argv[1]); printf("ecp_sock_open RV:%d\n", rv); rv = ecp_start_receiver(&sock_s); -- cgit v1.2.3