[Tinyos-2-commits] [tinyos-main] r5211 committed - rfxlink: Fix a bug reported by Brano (check is the RadioAlarm is free ...
tinyos-main at googlecode.com
tinyos-main at googlecode.com
Thu Nov 4 01:19:40 PDT 2010
Revision: 5211
Author: mmaroti at gmail.com
Date: Thu Nov 4 01:18:55 2010
Log: rfxlink: Fix a bug reported by Brano (check is the RadioAlarm is free
before using it)
http://code.google.com/p/tinyos-main/source/detail?r=5211
Modified:
/trunk/tos/lib/rfxlink/layers/RandomCollisionLayerP.nc
=======================================
--- /trunk/tos/lib/rfxlink/layers/RandomCollisionLayerP.nc Sat Oct 16
03:43:03 2010
+++ /trunk/tos/lib/rfxlink/layers/RandomCollisionLayerP.nc Thu Nov 4
01:18:55 2010
@@ -176,8 +176,12 @@
{
if( state == STATE_READY )
{
- call RadioAlarm.wait(delay);
- state = STATE_BARRIER;
+ // disregard the barrier for now, this needs a better solution
+ if( call RadioAlarm.isFree() )
+ {
+ call RadioAlarm.wait(delay);
+ state = STATE_BARRIER;
+ }
}
else
state |= STATE_BARRIER;
More information about the Tinyos-2-commits
mailing list