negative channels can talk to any other channel (both rx and tx)

This commit is contained in:
fros4943 2008-03-18 16:37:35 +00:00
parent 7f89171d26
commit f0fbbaa379
2 changed files with 8 additions and 4 deletions

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: MRM.java,v 1.6 2008/02/18 08:21:59 fros4943 Exp $
* $Id: MRM.java,v 1.7 2008/03/18 16:37:35 fros4943 Exp $
*/
package se.sics.mrm;
@ -94,7 +94,9 @@ public class MRM extends AbstractRadioMedium {
if (sendingRadio == listeningRadio) {
continue;
}
if (sendingRadio.getChannel() != listeningRadio.getChannel()) {
if (sendingRadio.getChannel() >= 0 &&
listeningRadio.getChannel() >= 0 &&
sendingRadio.getChannel() != listeningRadio.getChannel()) {
continue;
}

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: UDGM.java,v 1.17 2008/03/17 10:18:37 fros4943 Exp $
* $Id: UDGM.java,v 1.18 2008/03/18 16:37:35 fros4943 Exp $
*/
package se.sics.cooja.radiomediums;
@ -457,7 +457,9 @@ public class UDGM extends AbstractRadioMedium {
if (sendingRadio == listeningRadio) {
continue;
}
if (sendingRadio.getChannel() != listeningRadio.getChannel()) {
if (sendingRadio.getChannel() >= 0 &&
listeningRadio.getChannel() >= 0 &&
sendingRadio.getChannel() != listeningRadio.getChannel()) {
continue;
}