mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 00:22:35 +00:00
skypopen: making XEvents to works when EARLYMEDIA, and correctly manage threads death
This commit is contained in:
parent
d46a1ca701
commit
aaae4c652d
@ -1191,6 +1191,7 @@ static void *SWITCH_THREAD_FUNC skypopen_signaling_thread_func(switch_thread_t *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tech_pvt->skypopen_signaling_thread=NULL;
|
||||||
DEBUGA_SKYPE("EXITING\n", SKYPOPEN_P_LOG);
|
DEBUGA_SKYPE("EXITING\n", SKYPOPEN_P_LOG);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -1703,6 +1704,8 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_skypopen_shutdown)
|
|||||||
switch_file_write(tech_pvt->SkypopenHandles.fdesc[1], "sciutati", &howmany); // let's the controldev_thread die
|
switch_file_write(tech_pvt->SkypopenHandles.fdesc[1], "sciutati", &howmany); // let's the controldev_thread die
|
||||||
|
|
||||||
#else /* WIN32 */
|
#else /* WIN32 */
|
||||||
|
skypopen_signaling_write(tech_pvt, "DIE");
|
||||||
|
switch_sleep(10000);
|
||||||
howmany = write(tech_pvt->SkypopenHandles.fdesc[1], "sciutati", howmany);
|
howmany = write(tech_pvt->SkypopenHandles.fdesc[1], "sciutati", howmany);
|
||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
}
|
}
|
||||||
|
@ -584,6 +584,7 @@ int skypopen_signaling_read(private_t * tech_pvt)
|
|||||||
skypopen_sleep(1000);
|
skypopen_sleep(1000);
|
||||||
sprintf(msg_to_skype, "ALTER CALL %s SET_INPUT PORT=\"%d\"", id, tech_pvt->tcp_cli_port);
|
sprintf(msg_to_skype, "ALTER CALL %s SET_INPUT PORT=\"%d\"", id, tech_pvt->tcp_cli_port);
|
||||||
skypopen_signaling_write(tech_pvt, msg_to_skype);
|
skypopen_signaling_write(tech_pvt, msg_to_skype);
|
||||||
|
skypopen_sleep(1000);
|
||||||
sprintf(msg_to_skype, "#output ALTER CALL %s SET_OUTPUT PORT=\"%d\"", id, tech_pvt->tcp_srv_port);
|
sprintf(msg_to_skype, "#output ALTER CALL %s SET_OUTPUT PORT=\"%d\"", id, tech_pvt->tcp_srv_port);
|
||||||
skypopen_signaling_write(tech_pvt, msg_to_skype);
|
skypopen_signaling_write(tech_pvt, msg_to_skype);
|
||||||
|
|
||||||
@ -1408,6 +1409,7 @@ void *skypopen_do_skypeapi_thread_func(void *obj)
|
|||||||
win32_DeInitialize_DestroyWindowClass(tech_pvt);
|
win32_DeInitialize_DestroyWindowClass(tech_pvt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tech_pvt->skypopen_api_thread=NULL;
|
||||||
DEBUGA_SKYPE("EXITING\n", SKYPOPEN_P_LOG);
|
DEBUGA_SKYPE("EXITING\n", SKYPOPEN_P_LOG);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -1707,8 +1709,9 @@ void *skypopen_do_skypeapi_thread_func(void *obj)
|
|||||||
} else {
|
} else {
|
||||||
ERRORA("Skype is not running, maybe crashed. Please run/restart Skype and relaunch Skypopen\n", SKYPOPEN_P_LOG);
|
ERRORA("Skype is not running, maybe crashed. Please run/restart Skype and relaunch Skypopen\n", SKYPOPEN_P_LOG);
|
||||||
running = 0;
|
running = 0;
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
tech_pvt->skypopen_api_thread=NULL;
|
||||||
|
NOTICA("EXITING\n", SKYPOPEN_P_LOG);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user