Changeset 1523 for pjproject/trunk
- Timestamp:
- Oct 26, 2007 3:59:34 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/nat_detect.c
r1504 r1523 79 79 pj_timer_heap_t *timer_heap; 80 80 pj_timer_entry timer; 81 unsigned timer_executed; 81 82 82 83 void *user_data; … … 358 359 char errmsg[PJ_ERR_MSG_SIZE]; 359 360 pj_time_val delay; 361 362 if (sess->timer.id != 0) { 363 pj_timer_heap_cancel(sess->timer_heap, &sess->timer); 364 sess->timer.id = 0; 365 } 360 366 361 367 pj_bzero(&result, sizeof(result)); … … 831 837 } else if (te->id == TIMER_TEST) { 832 838 833 int executed;834 839 pj_bool_t next_timer; 835 840 836 841 pj_mutex_lock(sess->mutex); 837 842 838 executed = test_executed(sess);839 843 next_timer = PJ_FALSE; 840 844 841 if ( executed == ST_TEST_1) {845 if (sess->timer_executed == 0) { 842 846 send_test(sess, ST_TEST_1, NULL, 0); 843 847 next_timer = PJ_TRUE; 844 } else if ( executed == ST_TEST_2) {848 } else if (sess->timer_executed == 1) { 845 849 send_test(sess, ST_TEST_2, NULL, CHANGE_IP_PORT_FLAG); 846 850 next_timer = PJ_TRUE; 847 } else if ( executed == ST_TEST_3) {851 } else if (sess->timer_executed == 2) { 848 852 send_test(sess, ST_TEST_3, NULL, CHANGE_PORT_FLAG); 849 853 } else { 850 854 pj_assert(!"Shouldn't have timer at this state"); 851 855 } 856 857 ++sess->timer_executed; 852 858 853 859 if (next_timer) {
Note: See TracChangeset
for help on using the changeset viewer.