diff options
| author | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2012-07-14 11:42:10 +0000 |
|---|---|---|
| committer | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2012-07-14 11:42:10 +0000 |
| commit | f8d4f746847f4d04be66c556ed8780d345f1d741 (patch) | |
| tree | 4129caf94edc6db782518b2df3c60d7cb33fb3a9 | |
| parent | 8112ceb1d2ffab755b83dc7ed65840a5c88fbcee (diff) | |
| download | pica-pica-f8d4f746847f4d04be66c556ed8780d345f1d741.tar.gz pica-pica-f8d4f746847f4d04be66c556ed8780d345f1d741.zip | |
port numbers support in test_client
git-svn-id: svn://localhost/project_picapica/trunk@144 fb96df88-216d-11de-830c-f3023f12d8ac
| -rwxr-xr-x | tests/test_client | bin | 34109 -> 34025 bytes | |||
| -rwxr-xr-x | tests/test_client.c | 10 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_client b/tests/test_client Binary files differindex e3723b6..f08b315 100755 --- a/tests/test_client +++ b/tests/test_client 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); |
