getservices: add option to not save removed channels

Origin commit data
------------------
Branch: ni/coolstream
Commit: b577322a79
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-04-13 (Sat, 13 Apr 2013)


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

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2013-04-13 22:53:38 +02:00
committed by [CST] Focus
parent 5af41fd07f
commit c5aa1f78e9
2 changed files with 5 additions and 3 deletions

View File

@@ -112,7 +112,7 @@ class CServiceManager
bool InitSatPosition(t_satellite_position position, char * name = NULL, bool force = false, int deltype = FE_QPSK);
bool LoadServices(bool only_current);
void SaveServices(bool tocopy, bool if_changed = false);
void SaveServices(bool tocopy, bool if_changed = false, bool no_deleted = false);
void SaveMotorPositions();
bool SaveCurrentServices(transponder_id_t tpid);
bool CopyCurrentServices(transponder_id_t tpid);

View File

@@ -785,7 +785,7 @@ void CServiceManager::WriteSatHeader(FILE * fd, sat_config_t &config)
}
}
void CServiceManager::SaveServices(bool tocopy, bool if_changed)
void CServiceManager::SaveServices(bool tocopy, bool if_changed, bool no_deleted)
{
int processed = 0;
@@ -830,7 +830,9 @@ void CServiceManager::SaveServices(bool tocopy, bool if_changed)
tpdone = 1;
}
ccI->second.dumpServiceXml(fd);
/* don't dump removed channels if no_deleted == true */
if (!no_deleted || !(ccI->second.flags & CZapitChannel::REMOVED))
ccI->second.dumpServiceXml(fd);
processed++;
#ifdef SAVE_DEBUG
chans_processed.insert(ccI->second.getChannelID());