api4: fix name compare to realname compare

This commit is contained in:
Janus
2014-11-06 11:56:19 +01:00
committed by Jacek Jendrzej
parent 6586588409
commit 3f9d17c806
2 changed files with 2 additions and 1 deletions

View File

@@ -221,6 +221,7 @@ class CZapitChannel
/* get methods - read and write variables */
const std::string& getName(void) const { return (!uname.empty() ? uname : name); }
const std::string& getRealname(void) const { return name; }
const std::string& getUrl(void) const { return url; }
const std::string& getDesc(void) const { return desc; }
t_satellite_position getSatellitePosition(void) const { return satellitePosition; }

View File

@@ -1242,7 +1242,7 @@ bool CServiceManager::SaveCurrentServices(transponder_id_t tpid)
if(ccI == allchans.end()) {
WriteCurrentService(fd, satfound, tpdone, updated, satstr, tI->second, cI->second, "add");
} else {
if(strcmp(cI->second.getName().c_str(), ccI->second.getName().c_str()) || cI->second.scrambled != ccI->second.scrambled) {
if(strcmp(cI->second.getRealname().c_str(), ccI->second.getRealname().c_str()) || cI->second.scrambled != ccI->second.scrambled) {
cI->second.number = ccI->second.number;
WriteCurrentService(fd, satfound, tpdone, updated, satstr, tI->second, cI->second, "replace");
}