mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-10 07:08:33 +02:00
async CZapitMessages::CMD_RELOAD_CURRENTSERVICES as different way to resolve dead-lock after scan, for testing
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1864 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -469,9 +469,10 @@ void CZapitClient::reinitChannels()
|
|||||||
void CZapitClient::reloadCurrentServices()
|
void CZapitClient::reloadCurrentServices()
|
||||||
{
|
{
|
||||||
send(CZapitMessages::CMD_RELOAD_CURRENTSERVICES);
|
send(CZapitMessages::CMD_RELOAD_CURRENTSERVICES);
|
||||||
|
#if 0
|
||||||
CZapitMessages::responseCmd response;
|
CZapitMessages::responseCmd response;
|
||||||
CBasicClient::receive_data((char* )&response, sizeof(response), true);
|
CBasicClient::receive_data((char* )&response, sizeof(response), true);
|
||||||
|
#endif
|
||||||
close_connection();
|
close_connection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -562,6 +562,9 @@ bool CServiceScan::ScanProviders()
|
|||||||
g_bouquetManager->loadBouquets();
|
g_bouquetManager->loadBouquets();
|
||||||
printf("[scan] save bouquets done\n");
|
printf("[scan] save bouquets done\n");
|
||||||
Cleanup(true);
|
Cleanup(true);
|
||||||
|
#if 1
|
||||||
|
myZapitClient.reloadCurrentServices();
|
||||||
|
#else
|
||||||
/* this can hang as the thread handling the connections
|
/* this can hang as the thread handling the connections
|
||||||
* could already be in g_Zapit->stopScan(), waiting for
|
* could already be in g_Zapit->stopScan(), waiting for
|
||||||
* *this* thread to join().
|
* *this* thread to join().
|
||||||
@@ -572,6 +575,7 @@ bool CServiceScan::ScanProviders()
|
|||||||
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
||||||
CZapit::getInstance()->ZapIt(live_channel_id, false);
|
CZapit::getInstance()->ZapIt(live_channel_id, false);
|
||||||
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SERVICES_CHANGED);
|
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SERVICES_CHANGED);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
Cleanup(false);
|
Cleanup(false);
|
||||||
CFrontend::getInstance()->setTsidOnid(0);
|
CFrontend::getInstance()->setTsidOnid(0);
|
||||||
@@ -634,6 +638,9 @@ bool CServiceScan::ScanTransponder()
|
|||||||
//g_bouquetManager->clearAll();
|
//g_bouquetManager->clearAll();
|
||||||
g_bouquetManager->loadBouquets();
|
g_bouquetManager->loadBouquets();
|
||||||
Cleanup(true);
|
Cleanup(true);
|
||||||
|
#if 1
|
||||||
|
myZapitClient.reloadCurrentServices();
|
||||||
|
#else
|
||||||
/* see the explanation in CServiceScan::ScanProviders() in why this is a bad idea
|
/* see the explanation in CServiceScan::ScanProviders() in why this is a bad idea
|
||||||
myZapitClient.reloadCurrentServices();
|
myZapitClient.reloadCurrentServices();
|
||||||
*/
|
*/
|
||||||
@@ -641,6 +648,7 @@ bool CServiceScan::ScanTransponder()
|
|||||||
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
||||||
CZapit::getInstance()->ZapIt(live_channel_id, false);
|
CZapit::getInstance()->ZapIt(live_channel_id, false);
|
||||||
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SERVICES_CHANGED);
|
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SERVICES_CHANGED);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
Cleanup(false);
|
Cleanup(false);
|
||||||
CFrontend::getInstance()->setTsidOnid(0);
|
CFrontend::getInstance()->setTsidOnid(0);
|
||||||
|
@@ -956,8 +956,10 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case CZapitMessages::CMD_RELOAD_CURRENTSERVICES: {
|
case CZapitMessages::CMD_RELOAD_CURRENTSERVICES: {
|
||||||
|
#if 0
|
||||||
response.cmd = CZapitMessages::CMD_READY;
|
response.cmd = CZapitMessages::CMD_READY;
|
||||||
CBasicServer::send_data(connfd, &response, sizeof(response));
|
CBasicServer::send_data(connfd, &response, sizeof(response));
|
||||||
|
#endif
|
||||||
DBG("[zapit] sending EVT_SERVICES_CHANGED\n");
|
DBG("[zapit] sending EVT_SERVICES_CHANGED\n");
|
||||||
CFrontend::getInstance()->setTsidOnid(0);
|
CFrontend::getInstance()->setTsidOnid(0);
|
||||||
ZapIt(live_channel_id, current_is_nvod);
|
ZapIt(live_channel_id, current_is_nvod);
|
||||||
|
Reference in New Issue
Block a user