epglist is now working
[enigma2.git] / lib / components / scan.cpp
index c82d04e..cfbff6d 100644 (file)
@@ -61,7 +61,7 @@ int eComponentScan::start()
        eDVBResourceManager::getInstance(mgr);
 
        eDVBFrontendParameters *fe = new eDVBFrontendParameters();
-#if 0  
+#if 1
        eDVBFrontendParametersSatellite fesat;
                
        fesat.frequency = 11817000; // 12070000;
@@ -73,8 +73,8 @@ int eComponentScan::start()
 
        
        fe->setDVBS(fesat);
-#endif
 
+#else
        eDVBFrontendParametersTerrestrial fet;
        fet.frequency = 626000000;
        fet.inversion = eDVBFrontendParametersTerrestrial::Inversion::Unknown;
@@ -85,11 +85,14 @@ int eComponentScan::start()
        fet.guard_interval = eDVBFrontendParametersTerrestrial::GuardInterval::GI_1_32;
        fet.hierarchy = eDVBFrontendParametersTerrestrial::Hierarchy::HNone;
        fe->setDVBT(fet);
-       
-       ePtr<iDVBChannel> channel;
+#endif
+       eUsePtr<iDVBChannel> channel;
 
        if (mgr->allocateRawChannel(channel))
+       {
                eDebug("scan: allocating raw channel failed!");
+               return -1;
+       }
 
        std::list<ePtr<iDVBFrontendParameters> > list;
                
@@ -98,7 +101,7 @@ int eComponentScan::start()
        m_scan = new eDVBScan(channel);
        m_scan->connectEvent(slot(*this, &eComponentScan::scanEvent), m_scan_event_connection);
        m_scan->start(list);
-
+       
        return 0;
 }
 
@@ -126,3 +129,8 @@ int eComponentScan::isDone()
 {
        return m_done;
 }
+
+int eComponentScan::getError()
+{
+       return m_failed;
+}