X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Fftsp%2FTimeSyncP.nc;h=fc2ef9944e57cc1a05c1a7c9782cd2dc318f96ce;hb=1b3430016a83abd7c0deaaa08b86e93ad049fb2d;hp=ba96e92d1f797af0cb04e0c3180e8e2f937becef;hpb=63d57e90b8f69449521dcea7c4fdd293ef7b242e;p=tinyos-2.x.git diff --git a/tos/lib/ftsp/TimeSyncP.nc b/tos/lib/ftsp/TimeSyncP.nc index ba96e92d..fc2ef994 100644 --- a/tos/lib/ftsp/TimeSyncP.nc +++ b/tos/lib/ftsp/TimeSyncP.nc @@ -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();