]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/tossim/CpmModelC.nc
A couple of bug fixes.
[tinyos-2.x.git] / tos / lib / tossim / CpmModelC.nc
index 55616d9396cf000209b517fbed9c3a22cc3c2f3b..de73f0afc3379c09c9b847fbe788f13694a965b7 100644 (file)
@@ -202,6 +202,7 @@ implementation {
       if (list != msg) {
        noise += pow(10.0, list->power / 10.0);
       }
+      list = list->next;
     }
     noise = 10.0 * log(noise) / log(10.0);
     return shouldReceive(msg->power - noise);
@@ -215,6 +216,7 @@ implementation {
       if (list != msg) {
        noise += pow(10.0, list->power / 10.0);
       }
+      list = list->next;
     }
     noise = 10.0 * log(noise) / log(10.0);
     return noise;