diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-05-22 21:11:10 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-05-22 21:11:10 +0000 |
commit | a8a95675cba90ecd5ba2b7b36432641d4bf5703d (patch) | |
tree | 5152fce018768fc81ca81714509b09545e420de1 /pjnath/src/pjnath-test | |
parent | 3e51d83ffd41ea71ef0d1336b9c86b4f74192e43 (diff) |
Fixed ticket #285: ICE transport stops receiving packet upon getting ICMP unreach on Windows
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1288 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjnath/src/pjnath-test')
-rw-r--r-- | pjnath/src/pjnath-test/ice_test.c | 11 | ||||
-rw-r--r-- | pjnath/src/pjnath-test/test.c | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/pjnath/src/pjnath-test/ice_test.c b/pjnath/src/pjnath-test/ice_test.c index 2933a088..38bb6d02 100644 --- a/pjnath/src/pjnath-test/ice_test.c +++ b/pjnath/src/pjnath-test/ice_test.c @@ -292,8 +292,10 @@ static int perform_ice_test(const char *title, /* Start ICE on im2 */ status = start_ice(im2, im1); - if (status != PJ_SUCCESS) + if (status != PJ_SUCCESS) { + app_perror(" error starting ICE", status); return -30; + } /* Start ICE on im1 */ status = start_ice(im1, im2); @@ -328,8 +330,10 @@ static int perform_ice_test(const char *title, data_from_answerer = pj_str("from answerer"); status = pj_ice_sess_send_data(im2->ice, 1, data_from_answerer.ptr, data_from_answerer.slen); - if (status != PJ_SUCCESS) + if (status != PJ_SUCCESS) { + app_perror(" error sending packet", status); return -48; + } /* Poll to allow data to be received */ for (;;) { @@ -476,9 +480,12 @@ int ice_test(void) goto on_return; /* Failure case (all checks fail) */ +#if 0 + /* Cannot just add an SRFLX candidate; it needs a base */ rc = perform_ice_test("Failure case (all checks fail)", PJ_FALSE, 1, PJ_FALSE, D3, D3, 1, ocand, 1, acand); if (rc != 0) goto on_return; +#endif /* Direct communication with invalid address */ rc = perform_ice_test("With 1 unreachable address", PJ_TRUE, 1, PJ_TRUE, D1, D2, 1, ocand, 0, NULL); diff --git a/pjnath/src/pjnath-test/test.c b/pjnath/src/pjnath-test/test.c index 1542bcdd..b9776539 100644 --- a/pjnath/src/pjnath-test/test.c +++ b/pjnath/src/pjnath-test/test.c @@ -64,6 +64,8 @@ static int test_inner(void) pj_dump_config(); pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy, 0 ); + pjnath_init(); + #if INCLUDE_ICE_TEST DO_TEST(ice_test()); #endif |