- Timestamp:
- Oct 15, 2009 4:46:39 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/ice_session.c
r2944 r2948 1100 1100 pj_ice_sess *ice = (pj_ice_sess*) te->user_data; 1101 1101 enum timer_type type = (enum timer_type)te->id; 1102 pj_bool_t has_mutex = PJ_TRUE; 1102 1103 1103 1104 PJ_UNUSED_ARG(th); … … 1115 1116 break; 1116 1117 case TIMER_COMPLETION_CALLBACK: 1117 /* Start keep-alive timer but don't send any packets yet. 1118 * Need to do it here just in case app destroy the session 1119 * in the callback. 1120 */ 1121 if (ice->ice_status == PJ_SUCCESS) 1122 ice_keep_alive(ice, PJ_FALSE); 1123 1124 /* Notify app about ICE completion*/ 1125 if (ice->cb.on_ice_complete) 1126 (*ice->cb.on_ice_complete)(ice, ice->ice_status); 1118 { 1119 void (*on_ice_complete)(pj_ice_sess *ice, pj_status_t status); 1120 pj_status_t ice_status; 1121 1122 /* Start keep-alive timer but don't send any packets yet. 1123 * Need to do it here just in case app destroy the session 1124 * in the callback. 1125 */ 1126 if (ice->ice_status == PJ_SUCCESS) 1127 ice_keep_alive(ice, PJ_FALSE); 1128 1129 /* Release mutex in case app destroy us in the callback */ 1130 ice_status = ice->ice_status; 1131 on_ice_complete = ice->cb.on_ice_complete; 1132 has_mutex = PJ_FALSE; 1133 pj_mutex_unlock(ice->mutex); 1134 1135 /* Notify app about ICE completion*/ 1136 if (on_ice_complete) 1137 (*on_ice_complete)(ice, ice_status); 1138 } 1127 1139 break; 1128 1140 case TIMER_START_NOMINATED_CHECK: … … 1137 1149 } 1138 1150 1139 pj_mutex_unlock(ice->mutex); 1151 if (has_mutex) 1152 pj_mutex_unlock(ice->mutex); 1140 1153 } 1141 1154
Note: See TracChangeset
for help on using the changeset viewer.