X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Ftossim%2FCpmModelC.nc;h=bfa4f60f9ba9098503e80d46167f0f071057420d;hb=618c63a3bd6752cdd94d8511ffecaac79499283a;hp=de73f0afc3379c09c9b847fbe788f13694a965b7;hpb=c30f108c7c4050474b24cfc63e67720b6b1b38c5;p=tinyos-2.x.git diff --git a/tos/lib/tossim/CpmModelC.nc b/tos/lib/tossim/CpmModelC.nc index de73f0af..bfa4f60f 100644 --- a/tos/lib/tossim/CpmModelC.nc +++ b/tos/lib/tossim/CpmModelC.nc @@ -325,15 +325,15 @@ implementation { } command void Model.putOnAirTo(int dest, message_t* msg, bool ack, sim_time_t endTime, double power) { - gain_entry_t* link = sim_gain_first(sim_node()); + gain_entry_t* neighborEntry = sim_gain_first(sim_node()); requestAck = ack; outgoing = msg; dbg("CpmModelC", "Node %i transmitting to %i, finishes at %llu.\n", sim_node(), dest, endTime); - while (link != NULL) { - int other = link->mote; + while (neighborEntry != NULL) { + int other = neighborEntry->mote; sim_gain_put(other, msg, endTime, ack && (other == dest), power + sim_gain_value(sim_node(), other)); - link = sim_gain_next(link); + neighborEntry = sim_gain_next(neighborEntry); } }