]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Energy detection scan was not properly checking the radio state. Now fixed.
authorjanhauer <janhauer>
Mon, 27 Apr 2009 09:26:18 +0000 (09:26 +0000)
committerjanhauer <janhauer>
Mon, 27 Apr 2009 09:26:18 +0000 (09:26 +0000)
tos/lib/mac/tkn154/ScanP.nc

index 87db5761d07f3eb0b90d05fabc6bfb75fb27f632..366ccb7a92c0f2b63fdbc7d83f5c775ac88b3cc5 100644 (file)
@@ -324,7 +324,8 @@ implementation
       ((uint8_t*) m_resultList)[m_resultIndex++] = EnergyLevel;
     if (m_resultIndex == m_resultListNumEntries)
       m_terminateScan = TRUE; // done
-    call RadioOff.off();
+    if (call RadioOff.off() == EALREADY)
+      signal RadioOff.offDone();
   }
 
   /* ----------------------- Active/Orphan scan ----------------------- */