Changeset 1435 for pjproject/trunk/pjnath/src/pjnath/ice_session.c
- Timestamp:
- Sep 15, 2007 8:30:16 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/ice_session.c
r1410 r1435 337 337 } 338 338 339 if (ice->completion_timer.id) { 340 pj_timer_heap_cancel(ice->stun_cfg.timer_heap, 341 &ice->completion_timer); 342 ice->completion_timer.id = PJ_FALSE; 343 } 344 339 345 for (i=0; i<ice->comp_cnt; ++i) { 340 346 if (ice->comp[i].stun_sess) { … … 946 952 } 947 953 954 /* Timer callback to call on_ice_complete() callback */ 955 static void on_completion_timer(pj_timer_heap_t *th, 956 pj_timer_entry *te) 957 { 958 pj_ice_sess *ice = (pj_ice_sess*) te->user_data; 959 960 PJ_UNUSED_ARG(th); 961 962 te->id = PJ_FALSE; 963 964 if (ice->cb.on_ice_complete) 965 (*ice->cb.on_ice_complete)(ice, ice->ice_status); 966 } 967 948 968 /* This function is called when ICE processing completes */ 949 969 static void on_ice_complete(pj_ice_sess *ice, pj_status_t status) … … 963 983 /* Call callback */ 964 984 if (ice->cb.on_ice_complete) { 965 (*ice->cb.on_ice_complete)(ice, status); 985 pj_time_val delay = {0, 0}; 986 987 ice->completion_timer.cb = &on_completion_timer; 988 ice->completion_timer.user_data = (void*) ice; 989 ice->completion_timer.id = PJ_TRUE; 990 991 pj_timer_heap_schedule(ice->stun_cfg.timer_heap, 992 &ice->completion_timer, 993 &delay); 966 994 } 967 995 }
Note: See TracChangeset
for help on using the changeset viewer.