]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/tosthreads/capps/TestCollection/TestCollection.c
Increments the counter
[tinyos-2.x.git] / apps / tosthreads / capps / TestCollection / TestCollection.c
index 75da72871f886ef6b17fb27fc3fc351e041b1276..21aca5a0ff6426540ae2a9afaf3f04cb8da9d3fb 100644 (file)
@@ -76,14 +76,14 @@ void tosthread_main(void* arg) {
       
     for (;;) {
       if (reading == NREADINGS) {
-        oscilloscope_t *o = o;
-        o = (oscilloscope_t *) collectionGetPayload(&sendbuf, sizeof(oscilloscope_t));
+        oscilloscope_t *o = (oscilloscope_t *) collectionGetPayload(&sendbuf, sizeof(oscilloscope_t));
         if (o == NULL) {
           fatal_problem();
           return;
         }
         memcpy(o, &local, sizeof(local));
         if (collectionSend(&sendbuf, sizeof(local), AM_OSCILLOSCOPE) == SUCCESS) {
+          local.count++;
           report_sent();
         } else {
           report_problem();