fix "Clearall before scan" handling
[enigma2.git] / lib / dvb / scan.cpp
index 01b3cd321bf610f54adc124686ddd8a379300980..605128e7c8670caa6674aa81425840183d8a3bbb 100644 (file)
@@ -497,9 +497,10 @@ void eDVBScan::insertInto(iDVBChannelList *db)
                for (std::set<unsigned int>::iterator x(scanned_sat_positions.begin()); x != scanned_sat_positions.end(); ++x)
                {
                        eDVBChannelID chid;
-                       if (m_flags & scanDontRemoveFeed)
-                               chid.dvbnamespace = eDVBNamespace((*it)<<16));
-                       db->removeServices(chid, *it);
+                       if (m_flags & scanDontRemoveFeeds)
+                               chid.dvbnamespace = eDVBNamespace((*x)<<16);
+                       eDebug("remove %d %08x", *x, chid.dvbnamespace.get());
+                       db->removeServices(chid, *x);
                }
        }