[ns] bug in the NIST addon (+fix)
naouar yaagoubi
naouary at gmail.com
Thu Jun 18 17:00:51 PDT 2009
hi all,
I have discovered a bug in the nist addon in the channel.cc file:
this piece of code compute the affected nodes in the range of the sending
node so that the channel object will send the packet to their NetIf
for(tmp = xListHead_; tmp != NULL; tmp = tmp->nextX_) {
if(tmp->Y() >= ymin && tmp->Y() <= ymax && tmp->X() >= xmin &&
tmp->Y() <= ymax)
tmpList[n++] = tmp;
}
As you can see the tmp->Y() <= ymax is repeated twice in the If statement.
To correct this issue just change one of the tmp->Y() <= ymax to tmp->X() <=
xmax
best regards
More information about the Ns-users
mailing list