Changeset 1288
- Timestamp:
- May 22, 2007 9:11:10 PM (17 years ago)
- Location:
- pjproject/trunk/pjnath/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath-test/ice_test.c
r1129 r1288 293 293 /* Start ICE on im2 */ 294 294 status = start_ice(im2, im1); 295 if (status != PJ_SUCCESS) 295 if (status != PJ_SUCCESS) { 296 app_perror(" error starting ICE", status); 296 297 return -30; 298 } 297 299 298 300 /* Start ICE on im1 */ … … 329 331 data_from_answerer = pj_str("from answerer"); 330 332 status = pj_ice_sess_send_data(im2->ice, 1, data_from_answerer.ptr, data_from_answerer.slen); 331 if (status != PJ_SUCCESS) 333 if (status != PJ_SUCCESS) { 334 app_perror(" error sending packet", status); 332 335 return -48; 336 } 333 337 334 338 /* Poll to allow data to be received */ … … 477 481 478 482 /* Failure case (all checks fail) */ 483 #if 0 484 /* Cannot just add an SRFLX candidate; it needs a base */ 479 485 rc = perform_ice_test("Failure case (all checks fail)", PJ_FALSE, 1, PJ_FALSE, D3, D3, 1, ocand, 1, acand); 480 486 if (rc != 0) 481 487 goto on_return; 488 #endif 482 489 483 490 /* Direct communication with invalid address */ -
pjproject/trunk/pjnath/src/pjnath-test/test.c
r1129 r1288 65 65 pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy, 0 ); 66 66 67 pjnath_init(); 68 67 69 #if INCLUDE_ICE_TEST 68 70 DO_TEST(ice_test()); -
pjproject/trunk/pjnath/src/pjnath/ice_strans.c
r1248 r1288 441 441 pj_ice_strans *ice_st = comp->ice_st; 442 442 pj_ssize_t pkt_size; 443 enum { RETRY = 4 }; 444 unsigned retry; 443 445 pj_status_t status; 444 446 … … 512 514 513 515 /* Read next packet */ 514 pkt_size = sizeof(comp->pkt); 515 comp->src_addr_len = sizeof(comp->src_addr); 516 status = pj_ioqueue_recvfrom(key, op_key, comp->pkt, &pkt_size, 517 PJ_IOQUEUE_ALWAYS_ASYNC, 518 &comp->src_addr, &comp->src_addr_len); 519 if (status != PJ_SUCCESS && status != PJ_EPENDING) { 520 ice_st_perror(comp->ice_st, "ioqueue recvfrom() error", status); 516 for (retry=0; retry<RETRY; ++retry) { 517 pkt_size = sizeof(comp->pkt); 518 comp->src_addr_len = sizeof(comp->src_addr); 519 status = pj_ioqueue_recvfrom(key, op_key, comp->pkt, &pkt_size, 520 PJ_IOQUEUE_ALWAYS_ASYNC, 521 &comp->src_addr, &comp->src_addr_len); 522 if (status != PJ_SUCCESS && status != PJ_EPENDING) { 523 ice_st_perror(comp->ice_st, "ioqueue recvfrom() error", status); 524 } else { 525 break; 526 } 521 527 } 522 528 }
Note: See TracChangeset
for help on using the changeset viewer.