From 20fc6d7c0f9a9f23217b9562a743ab681cd33f75 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Thu, 1 Dec 2005 16:14:19 +0000 Subject: [PATCH] small fix --- lib/dvb/frontend.cpp | 4 ++-- lib/dvb/scan.cpp | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp index 795841b8..049753b0 100644 --- a/lib/dvb/frontend.cpp +++ b/lib/dvb/frontend.cpp @@ -195,8 +195,8 @@ RESULT eDVBFrontendParameters::getHash(unsigned long &hash) const { case iDVBFrontend::feSatellite: { - hash = sat.frequency & 0xFFFF; - hash |= sat.orbital_position << 16; + hash = (sat.orbital_position << 16); + hash |= ((sat.frequency/1000)&0xFFFF)|((sat.polarisation&1) << 15); return 0; } case iDVBFrontend::feCable: diff --git a/lib/dvb/scan.cpp b/lib/dvb/scan.cpp index 8865f304..e1bd0012 100644 --- a/lib/dvb/scan.cpp +++ b/lib/dvb/scan.cpp @@ -375,7 +375,22 @@ void eDVBScan::start(const eSmartPtrList &known_transpon m_ch_unavailable.clear(); m_new_channels.clear(); m_new_services.clear(); - m_ch_toScan.insert(m_ch_toScan.end(), known_transponders.begin(), known_transponders.end()); + + for (eSmartPtrList::const_iterator i(known_transponders.begin()); i != known_transponders.end(); ++i) + { + bool exist=false; + for (std::list >::const_iterator ii(m_ch_toScan.begin()); ii != m_ch_toScan.end(); ++ii) + { + if (sameChannel(*i, *ii)) + { + exist=true; + break; + } + } + if (!exist) + m_ch_toScan.push_back(*i); + } + nextChannel(); } -- 2.30.2