no reception possible if radio already busy

This commit is contained in:
fros4943 2006-10-05 12:27:30 +00:00
parent 8df08f3d05
commit 2892edc2fa

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ContikiRadio.java,v 1.5 2006/10/05 07:49:59 fros4943 Exp $
* $Id: ContikiRadio.java,v 1.6 2006/10/05 12:27:30 fros4943 Exp $
*/
package se.sics.cooja.contikimote.interfaces;
@ -200,10 +200,10 @@ public class ContikiRadio extends Radio implements ContikiMoteInterface {
}
public void receivePacket(byte[] data, int endTime) {
if (isInterfered())
return;
if (isReceiving())
if (isInterfered() || isReceiving() || isTransmitting()) {
interferReception(endTime);
return;
}
lockInReceivingMode();