]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
loosen layer dependency
authorandreaskoepke <andreaskoepke>
Tue, 22 Jul 2008 07:22:52 +0000 (07:22 +0000)
committerandreaskoepke <andreaskoepke>
Tue, 22 Jul 2008 07:22:52 +0000 (07:22 +0000)
tos/lib/ftsp/TimeSyncP.nc

index ba96e92d1f797af0cb04e0c3180e8e2f937becef..fc2ef9944e57cc1a05c1a7c9782cd2dc318f96ce 100644 (file)
@@ -265,7 +265,7 @@ implementation
 
     void task processMsg()
     {
-        TimeSyncMsg* msg = (TimeSyncMsg*)(processedMsg->data);
+        TimeSyncMsg* msg = (TimeSyncMsg*)(call Send.getPayload(processedMsg, sizeof(TimeSyncMsg)));
 
         if( msg->rootID < outgoingMsg->rootID &&
             // jw: after becoming the root ignore other roots messages (in send period)
@@ -306,7 +306,7 @@ implementation
             message_t* old = processedMsg;
 
             processedMsg = msg;
-            ((TimeSyncMsg*)(processedMsg->data))->localTime = call TimeSyncPacket.eventTime(msg);
+            ((TimeSyncMsg*)(payload))->localTime = call TimeSyncPacket.eventTime(msg);
 
             state |= STATE_PROCESSING;
             post processMsg();