skypopen: making XEvents to works when EARLYMEDIA, and correctly manage threads death

This commit is contained in:
Giovanni 2010-03-31 16:22:25 +02:00
parent d46a1ca701
commit aaae4c652d
2 changed files with 7 additions and 1 deletions

View File

@ -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);
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
#else /* WIN32 */
skypopen_signaling_write(tech_pvt, "DIE");
switch_sleep(10000);
howmany = write(tech_pvt->SkypopenHandles.fdesc[1], "sciutati", howmany);
#endif /* WIN32 */
}

View File

@ -584,6 +584,7 @@ int skypopen_signaling_read(private_t * tech_pvt)
skypopen_sleep(1000);
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_sleep(1000);
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);
@ -1408,6 +1409,7 @@ void *skypopen_do_skypeapi_thread_func(void *obj)
win32_DeInitialize_DestroyWindowClass(tech_pvt);
}
}
tech_pvt->skypopen_api_thread=NULL;
DEBUGA_SKYPE("EXITING\n", SKYPOPEN_P_LOG);
return NULL;
}
@ -1707,8 +1709,9 @@ void *skypopen_do_skypeapi_thread_func(void *obj)
} else {
ERRORA("Skype is not running, maybe crashed. Please run/restart Skype and relaunch Skypopen\n", SKYPOPEN_P_LOG);
running = 0;
return NULL;
}
tech_pvt->skypopen_api_thread=NULL;
NOTICA("EXITING\n", SKYPOPEN_P_LOG);
return NULL;
}