getservices: add option to not save removed channels

Origin commit data
------------------
Branch: ni/coolstream
Commit: 1aa0915512
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
parent 858bd31770
commit 7e15658420
2 changed files with 5 additions and 3 deletions

View File

@@ -109,7 +109,7 @@ class CServiceManager
bool InitSatPosition(t_satellite_position position, char * name = NULL, bool force = false);
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

@@ -783,7 +783,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;
@@ -826,6 +826,8 @@ void CServiceManager::SaveServices(bool tocopy, bool if_changed)
tpdone = 1;
}
/* 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