Full fix for this issue will be worked on as a medium to long term roadmap item.
pjroject issue viewable at https://trac.pjsip.org/repos/ticket/1548
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369703
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
pj_uint8_t *prefs; /**< Type preference. */
pj_bool_t is_nominating; /**< Nominating stage */
pj_bool_t is_complete; /**< Complete? */
pj_uint8_t *prefs; /**< Type preference. */
pj_bool_t is_nominating; /**< Nominating stage */
pj_bool_t is_complete; /**< Complete? */
+ pj_bool_t is_destroying; /**< Destroy is called */
pj_status_t ice_status; /**< Error status. */
pj_timer_entry timer; /**< ICE timer. */
pj_ice_sess_cb cb; /**< Callback. */
pj_status_t ice_status; /**< Error status. */
pj_timer_entry timer; /**< ICE timer. */
pj_ice_sess_cb cb; /**< Callback. */
LOG4((ice->obj_name, "Destroying ICE session"));
}
LOG4((ice->obj_name, "Destroying ICE session"));
}
+ ice->is_destroying = PJ_TRUE;
+
/* Let other callbacks finish */
if (ice->mutex) {
pj_mutex_lock(ice->mutex);
/* Let other callbacks finish */
if (ice->mutex) {
pj_mutex_lock(ice->mutex);
ice = td->ice;
clist = td->clist;
ice = td->ice;
clist = td->clist;
+ if (ice->is_destroying)
+ return PJ_SUCCESS;
+
pj_mutex_lock(ice->mutex);
pj_mutex_lock(ice->mutex);
+ if (ice->is_destroying) {
+ pj_mutex_unlock(ice->mutex);
+ return PJ_SUCCESS;
+ }
+
/* Set timer ID to FALSE first */
te->id = PJ_FALSE;
/* Set timer ID to FALSE first */
te->id = PJ_FALSE;