summaryrefslogtreecommitdiff
path: root/code/test/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'code/test/server.c')
-rw-r--r--code/test/server.c8
1 files changed, 4 insertions, 4 deletions
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 <node.priv> [address]\n", arg);
+ fprintf(stderr, "Usage: %s <address> <node.priv>\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);