mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-16 06:18:35 +00:00
skypopen: fixed crash on closing XDisplay before is used by interface shutdown/remove
This commit is contained in:
1 parent
7d7f23cebb
commit
9274deeabb
2 files changed
+17
-1
No files matched your search
@@ -397,6 +397,12 @@ static switch_status_t interface_exists(char *the_interface)
|
|||||||
switch_yield(50000);
|
switch_yield(50000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tech_pvt->SkypopenHandles.disp) {
|
||||||
|
NOTICA("REMOVE CLOSIN X\n", SKYPOPEN_P_LOG);
|
||||||
|
XCloseDisplay(tech_pvt->SkypopenHandles.disp);
|
||||||
|
NOTICA("REMOVE CLOSIN X END\n", SKYPOPEN_P_LOG);
|
||||||
|
}
|
||||||
|
|
||||||
if (globals.SKYPOPEN_INTERFACES[interface_id].skypopen_signaling_thread) {
|
if (globals.SKYPOPEN_INTERFACES[interface_id].skypopen_signaling_thread) {
|
||||||
switch_thread_join(&status, globals.SKYPOPEN_INTERFACES[interface_id].skypopen_signaling_thread);
|
switch_thread_join(&status, globals.SKYPOPEN_INTERFACES[interface_id].skypopen_signaling_thread);
|
||||||
}
|
}
|
||||||
@@ -1993,6 +1999,11 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_skypopen_shutdown)
|
|||||||
x--;
|
x--;
|
||||||
switch_yield(50000);
|
switch_yield(50000);
|
||||||
}
|
}
|
||||||
|
if (tech_pvt->SkypopenHandles.disp) {
|
||||||
|
NOTICA("CLOSIN X\n", SKYPOPEN_P_LOG);
|
||||||
|
XCloseDisplay(tech_pvt->SkypopenHandles.disp);
|
||||||
|
NOTICA("CLOSIN X END\n", SKYPOPEN_P_LOG);
|
||||||
|
}
|
||||||
if (globals.SKYPOPEN_INTERFACES[interface_id].skypopen_signaling_thread) {
|
if (globals.SKYPOPEN_INTERFACES[interface_id].skypopen_signaling_thread) {
|
||||||
switch_thread_join(&status, globals.SKYPOPEN_INTERFACES[interface_id].skypopen_signaling_thread);
|
switch_thread_join(&status, globals.SKYPOPEN_INTERFACES[interface_id].skypopen_signaling_thread);
|
||||||
}
|
}
|
||||||
@@ -3106,11 +3117,15 @@ struct SkypopenHandles *skypopen_list_remove_by_value(struct SkypopenList *list,
|
|||||||
// CLOUDTREE (THomas Hazel) - is there a capable freeswitch list?
|
// CLOUDTREE (THomas Hazel) - is there a capable freeswitch list?
|
||||||
struct SkypopenHandles *skypopen_list_remove_by_reference(struct SkypopenList *list, struct SkypopenHandles *handle)
|
struct SkypopenHandles *skypopen_list_remove_by_reference(struct SkypopenList *list, struct SkypopenHandles *handle)
|
||||||
{
|
{
|
||||||
|
private_t *tech_pvt=NULL;
|
||||||
|
|
||||||
switch_mutex_lock(globals.list_mutex);
|
switch_mutex_lock(globals.list_mutex);
|
||||||
|
|
||||||
|
NOTICA("BEGIN REMOVE\n", SKYPOPEN_P_LOG);
|
||||||
if (handle->managed == SWITCH_FALSE) {
|
if (handle->managed == SWITCH_FALSE) {
|
||||||
// already removed
|
// already removed
|
||||||
switch_mutex_unlock(globals.list_mutex);
|
switch_mutex_unlock(globals.list_mutex);
|
||||||
|
NOTICA("EXIT REMOVE\n", SKYPOPEN_P_LOG);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3135,6 +3150,7 @@ struct SkypopenHandles *skypopen_list_remove_by_reference(struct SkypopenList *l
|
|||||||
list->entries--;
|
list->entries--;
|
||||||
|
|
||||||
switch_mutex_unlock(globals.list_mutex);
|
switch_mutex_unlock(globals.list_mutex);
|
||||||
|
NOTICA("EXIT REMOVE\n", SKYPOPEN_P_LOG);
|
||||||
|
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1883,7 +1883,7 @@ void *skypopen_do_skypeapi_thread_func(void *obj)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
tech_pvt->skypopen_api_thread = NULL;
|
tech_pvt->skypopen_api_thread = NULL;
|
||||||
XCloseDisplay(disp);
|
//XCloseDisplay(disp);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user