提交 e929cd96 authored 作者: Giovanni Maruzzelli's avatar Giovanni Maruzzelli

skypiax: fixed crash when you set an interface as 'sk' console, then remove the…

skypiax: fixed crash when you set an interface as 'sk' console, then remove the interface, then use the 'sk' command to send a message to the API (it try to use a non-existing interface)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14411 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 506d3768
......@@ -348,9 +348,14 @@ static switch_status_t remove_interface(char *interface)
globals.SKYPIAX_INTERFACES[interface_id].skypiax_api_thread);
}
memset(&globals.SKYPIAX_INTERFACES[interface_id], '\0', sizeof(private_t));
switch_mutex_lock(globals.mutex);
if(globals.sk_console == &globals.SKYPIAX_INTERFACES[interface_id]){
DEBUGA_SKYPE("interface '%s' no more console\n", SKYPIAX_P_LOG, interface);
globals.sk_console = NULL;
} else {
DEBUGA_SKYPE("interface '%s' STILL console\n", SKYPIAX_P_LOG, interface);
}
memset(&globals.SKYPIAX_INTERFACES[interface_id], '\0', sizeof(private_t));
globals.real_interfaces--;
switch_mutex_unlock(globals.mutex);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论