From: janhauer Date: Mon, 27 Apr 2009 09:26:18 +0000 (+0000) Subject: Energy detection scan was not properly checking the radio state. Now fixed. X-Git-Tag: rc_6_tinyos_2_1_1~403 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=4a1b294340a6bb0173c5417327a890af68aad744 Energy detection scan was not properly checking the radio state. Now fixed. --- diff --git a/tos/lib/mac/tkn154/ScanP.nc b/tos/lib/mac/tkn154/ScanP.nc index 87db5761..366ccb7a 100644 --- a/tos/lib/mac/tkn154/ScanP.nc +++ b/tos/lib/mac/tkn154/ScanP.nc @@ -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 ----------------------- */