]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/net/ctp/CtpForwardingEngineP.nc
senddone return value comply with the Send interface specification
[tinyos-2.x.git] / tos / lib / net / ctp / CtpForwardingEngineP.nc
index 65fe70086fa116590c30055e86caf6bf2c76a346..538fb6469bc49da3dcf6fec9aceb4a1acb3c50b8 100644 (file)
@@ -274,9 +274,9 @@ implementation {
     }
   }
 
-  static void startRetxmitTimer(uint16_t mask, uint16_t offset) {
+  static void startRetxmitTimer(uint16_t window, uint16_t offset) {
     uint16_t r = call Random.rand16();
-    r &= mask;
+    r %= window;
     r += offset;
     call RetxmitTimer.startOneShot(r);
     dbg("Forwarder", "Rexmit timer will fire in %hu ms\n", r);
@@ -576,7 +576,7 @@ implementation {
        // two is different.
         if (qe->client < CLIENT_COUNT) { // Client packet
          clientPtrs[qe->client] = qe;
-         signal Send.sendDone[qe->client](msg, FAIL);
+         signal Send.sendDone[qe->client](msg, SUCCESS);
          call CollectionDebug.logEventMsg(NET_C_FE_SENDDONE_FAIL_ACK_SEND, 
                                           call CollectionPacket.getSequenceNumber(msg), 
                                           call CollectionPacket.getOrigin(msg),