Changeset 1904
- Timestamp:
- Apr 1, 2008 6:23:56 PM (17 years ago)
- Location:
- pjproject/trunk/pjnath/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/turn_udp.c
r1879 r1904 156 156 sess_cb.on_rx_data = &turn_on_rx_data; 157 157 sess_cb.on_state = &turn_on_state; 158 status = pj_turn_session_create(cfg, pool->obj_name, af, PJ_TURN_TP_UDP,158 status = pj_turn_session_create(cfg, "turn%p", af, PJ_TURN_TP_UDP, 159 159 &sess_cb, udp_rel, 0, &udp_rel->sess); 160 160 if (status != PJ_SUCCESS) { … … 476 476 477 477 if (new_state >= PJ_TURN_STATE_DESTROYING && udp_rel->sess) { 478 if (udp_rel->destroy_request) { 478 479 udp_rel->sess = NULL; 480 // Always destroy the session regardless whether application 481 // has called pj_turn_udp_destroy() or not. This is to handle 482 // the case when Allocate request fails. 483 //if (udp_rel->destroy_request) { 484 if (1) { 479 485 pj_time_val delay = {0, 0}; 480 486 481 pj_turn_session_set_user_data(udp_rel->sess, NULL); 487 pj_turn_session_set_user_data(sess, NULL); 488 489 if (udp_rel->timer.id != TIMER_NONE) { 490 pj_timer_heap_cancel(udp_rel->timer_heap, &udp_rel->timer); 491 } 482 492 483 493 udp_rel->timer.id = TIMER_DESTROY; 484 494 pj_timer_heap_schedule(udp_rel->timer_heap, &udp_rel->timer, 485 495 &delay); 486 } else {487 udp_rel->sess = NULL;488 496 } 489 497 } -
pjproject/trunk/pjnath/src/pjturn-client/client_main.c
r1888 r1904 358 358 peer1_addr); 359 359 puts("+-----------------------------------+ |"); 360 puts("| q Quit 360 puts("| q Quit d Dump | 1 Send data to relay adderss |"); 361 361 puts("+-----------------------------------+--------------------------------+"); 362 362 printf(">>> "); … … 380 380 case 'a': 381 381 create_relay(); 382 break; 383 case 'd': 384 pj_pool_factory_dump(&g.cp.factory, PJ_TRUE); 382 385 break; 383 386 case 's':
Note: See TracChangeset
for help on using the changeset viewer.