- improved scan error handling
[enigma2.git] / lib / components / scan.cpp
index c82d04efa39547ffc139a9c024af51d13149111f..ad2e4d1aff2446e5422bde8422fffe3dce51b364 100644 (file)
@@ -89,7 +89,10 @@ int eComponentScan::start()
        ePtr<iDVBChannel> channel;
 
        if (mgr->allocateRawChannel(channel))
        ePtr<iDVBChannel> channel;
 
        if (mgr->allocateRawChannel(channel))
+       {
                eDebug("scan: allocating raw channel failed!");
                eDebug("scan: allocating raw channel failed!");
+               return -1;
+       }
 
        std::list<ePtr<iDVBFrontendParameters> > list;
                
 
        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);
        m_scan = new eDVBScan(channel);
        m_scan->connectEvent(slot(*this, &eComponentScan::scanEvent), m_scan_event_connection);
        m_scan->start(list);
-
+       
        return 0;
 }
 
        return 0;
 }
 
@@ -126,3 +129,8 @@ int eComponentScan::isDone()
 {
        return m_done;
 }
 {
        return m_done;
 }
+
+int eComponentScan::getError()
+{
+       return m_failed;
+}