From f8d4f746847f4d04be66c556ed8780d345f1d741 Mon Sep 17 00:00:00 2001 From: me_desk Date: Sat, 14 Jul 2012 11:42:10 +0000 Subject: port numbers support in test_client git-svn-id: svn://localhost/project_picapica/trunk@144 fb96df88-216d-11de-830c-f3023f12d8ac --- tests/test_client | Bin 34109 -> 34025 bytes tests/test_client.c | 10 +++++----- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/test_client b/tests/test_client index e3723b6..f08b315 100755 Binary files a/tests/test_client and b/tests/test_client differ diff --git a/tests/test_client.c b/tests/test_client.c index 89e0c8c..818860a 100755 --- a/tests/test_client.c +++ b/tests/test_client.c @@ -102,9 +102,9 @@ int main(int argc,char** argv) int ret; unsigned int peer_id; -if (argc<3) +if (argc<4) { - puts("usage: test_client address cert_filename [peer id]"); + puts("usage: test_client address port cert_filename [peer id]"); return 0; } @@ -125,7 +125,7 @@ PICA_client_init(&cbs); printf("making connection...\n"); //PICA_new_connection(const char *nodeaddr, unsigned int port, const char *CA_file, const char *cert_file, const char *pkey_file, const char* password, struct PICA_conninfo **ci) -ret=PICA_new_connection(argv[1], 51914,"trusted_CA.pem",argv[2],argv[2],NULL,&c); +ret=PICA_new_connection(argv[1], atoi(argv[2]), "trusted_CA.pem", argv[3],argv[3],NULL,&c); ERR_print_errors_fp(stdout); @@ -137,9 +137,9 @@ printf("PICA_new_connection: ret=%i\n",ret); return 1; } -if (argc==4) +if (argc==5) { - peer_id=atoi(argv[3]); + peer_id=atoi(argv[4]); printf("Creating channel to %u...\n",peer_id); ret=PICA_create_channel(c,peer_id,&chn); -- cgit v1.2.1