diff --git a/src/zapit/lib/zapitclient.cpp b/src/zapit/lib/zapitclient.cpp index 98acf56fc..588249d55 100644 --- a/src/zapit/lib/zapitclient.cpp +++ b/src/zapit/lib/zapitclient.cpp @@ -469,9 +469,10 @@ void CZapitClient::reinitChannels() void CZapitClient::reloadCurrentServices() { send(CZapitMessages::CMD_RELOAD_CURRENTSERVICES); - +#if 0 CZapitMessages::responseCmd response; CBasicClient::receive_data((char* )&response, sizeof(response), true); +#endif close_connection(); } diff --git a/src/zapit/src/scan.cpp b/src/zapit/src/scan.cpp index bcf85cc73..26fef3179 100644 --- a/src/zapit/src/scan.cpp +++ b/src/zapit/src/scan.cpp @@ -562,6 +562,9 @@ bool CServiceScan::ScanProviders() g_bouquetManager->loadBouquets(); printf("[scan] save bouquets done\n"); Cleanup(true); +#if 1 + myZapitClient.reloadCurrentServices(); +#else /* this can hang as the thread handling the connections * could already be in g_Zapit->stopScan(), waiting for * *this* thread to join(). @@ -572,6 +575,7 @@ bool CServiceScan::ScanProviders() t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); CZapit::getInstance()->ZapIt(live_channel_id, false); CZapit::getInstance()->SendEvent(CZapitClient::EVT_SERVICES_CHANGED); +#endif } else { Cleanup(false); CFrontend::getInstance()->setTsidOnid(0); @@ -634,6 +638,9 @@ bool CServiceScan::ScanTransponder() //g_bouquetManager->clearAll(); g_bouquetManager->loadBouquets(); Cleanup(true); +#if 1 + myZapitClient.reloadCurrentServices(); +#else /* see the explanation in CServiceScan::ScanProviders() in why this is a bad idea myZapitClient.reloadCurrentServices(); */ @@ -641,6 +648,7 @@ bool CServiceScan::ScanTransponder() t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); CZapit::getInstance()->ZapIt(live_channel_id, false); CZapit::getInstance()->SendEvent(CZapitClient::EVT_SERVICES_CHANGED); +#endif } else { Cleanup(false); CFrontend::getInstance()->setTsidOnid(0); diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index f03ac8421..ce155eefe 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -956,8 +956,10 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd) } case CZapitMessages::CMD_RELOAD_CURRENTSERVICES: { +#if 0 response.cmd = CZapitMessages::CMD_READY; CBasicServer::send_data(connfd, &response, sizeof(response)); +#endif DBG("[zapit] sending EVT_SERVICES_CHANGED\n"); CFrontend::getInstance()->setTsidOnid(0); ZapIt(live_channel_id, current_is_nvod);