getservices: don't update channels if only scrambling changed

Origin commit data
------------------
Branch: ni/coolstream
Commit: a68f2f73b6
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-02-12 (Sun, 12 Feb 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2017-02-12 12:05:03 +01:00
parent c35236e9b5
commit 872745ffe2

View File

@@ -1109,7 +1109,11 @@ bool CServiceManager::CopyCurrentServices(transponder_id_t tpid)
updated = true; updated = true;
printf("CServiceManager::CopyCurrentServices: [%s] add\n", cI->second.getName().c_str()); printf("CServiceManager::CopyCurrentServices: [%s] add\n", cI->second.getName().c_str());
} else { } else {
if(cI->second.scrambled != aI->second.scrambled || cI->second.getName() != aI->second.getName()) { if (cI->second.getName() != aI->second.getName()
#ifdef UPDATE_CHANNELS_ON_SCRAMBLED_CHANGE
|| cI->second.scrambled != aI->second.scrambled
#endif
) {
aI->second.setName(cI->second.getName()); aI->second.setName(cI->second.getName());
aI->second.scrambled = cI->second.scrambled; aI->second.scrambled = cI->second.scrambled;
aI->second.flags = CZapitChannel::UPDATED; aI->second.flags = CZapitChannel::UPDATED;
@@ -1217,7 +1221,11 @@ bool CServiceManager::SaveCurrentServices(transponder_id_t tpid)
if(ccI == allchans.end()) { if(ccI == allchans.end()) {
WriteCurrentService(fd, satfound, tpdone, updated, satstr, tI->second, cI->second, "add"); WriteCurrentService(fd, satfound, tpdone, updated, satstr, tI->second, cI->second, "add");
} else { } else {
if(strcmp(cI->second.getRealname().c_str(), ccI->second.getRealname().c_str()) || cI->second.scrambled != ccI->second.scrambled) { if (strcmp(cI->second.getRealname().c_str(), ccI->second.getRealname().c_str())
#ifdef UPDATE_CHANNELS_ON_SCRAMBLED_CHANGE
|| cI->second.scrambled != ccI->second.scrambled
#endif
) {
cI->second.number = ccI->second.number; cI->second.number = ccI->second.number;
WriteCurrentService(fd, satfound, tpdone, updated, satstr, tI->second, cI->second, "replace"); WriteCurrentService(fd, satfound, tpdone, updated, satstr, tI->second, cI->second, "replace");
} }