提交 1ed11fdc authored 作者: Anthony Minessale's avatar Anthony Minessale

fix sofia ping

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8365 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 421c25ad
......@@ -75,7 +75,6 @@ void sofia_handle_sip_r_notify(switch_core_session_t *session, int status,
sql = switch_mprintf("delete from sip_subscriptions where call_id='%q'", sip->sip_call_id->i_id);
switch_assert(sql != NULL);
sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);
nua_handle_destroy(nh);
}
}
......@@ -347,14 +346,18 @@ void sofia_event_callback(nua_event_t event,
//switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Destroy handle [%s]\n", nua_event_name(event));
if (sofia_private) {
nua_handle_bind(nh, NULL);
sofia_private->destroy_me = 1;
}
nua_handle_destroy(nh);
nh = NULL;
}
break;
}
if (sofia_private && sofia_private->destroy_me) {
if (nh) {
nua_handle_bind(nh, NULL);
}
sofia_private->destroy_me = 12;
free(sofia_private);
sofia_private = NULL;
}
......@@ -1520,6 +1523,7 @@ static void sofia_handle_sip_r_options(switch_core_session_t *session, int statu
if (sofia_private && !switch_strlen_zero(sofia_private->gateway_name)) {
gateway = sofia_reg_find_gateway(sofia_private->gateway_name);
sofia_private->destroy_me = 1;
}
if (gateway) {
......
......@@ -88,7 +88,6 @@ void sofia_reg_check_gateway(sofia_profile_t *profile, time_t now)
switch_assert(pvt);
memset(pvt, 0, sizeof(*pvt));
pvt->destroy_nh = 1;
pvt->destroy_me = 1;
switch_copy_string(pvt->gateway_name, gateway_ptr->name, sizeof(pvt->gateway_name));
nua_handle_bind(nh, pvt);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论