]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/net/lqi/LqiRoutingEngineP.nc
Remove bogus 'tab:4' and 'tab:2' markers.
[tinyos-2.x.git] / tos / lib / net / lqi / LqiRoutingEngineP.nc
index 89ede9dcc265c2340ef94d3030ff24e646953967..9962a8312f20ebd75141f57ef09617c60041634c 100644 (file)
@@ -1,4 +1,4 @@
-/*                                                                     tab:4
+/*
  * "Copyright (c) 2000-2003 The Regents of the University  of California.  
  * All rights reserved.
  *
@@ -108,11 +108,11 @@ implementation {
   }
 
   lqi_header_t* getHeader(message_t* msg) {
-    return (lqi_header_t*)call Packet.getPayload(msg, NULL);
+    return (lqi_header_t*)call Packet.getPayload(msg, sizeof(lqi_header_t));
   }
   
   lqi_beacon_msg_t* getBeacon(message_t* msg) {
-    return (lqi_beacon_msg_t*)call Packet.getPayload(msg, NULL);
+    return (lqi_beacon_msg_t*)call Packet.getPayload(msg, sizeof(lqi_beacon_msg_t));
   }
 
   task void SendRouteTask() {
@@ -277,7 +277,7 @@ implementation {
   }
 
   command error_t RouteSelect.initializeFields(message_t* msg) {
-    lqi_header_t* header = (lqi_header_t*)call Packet.getPayload(msg, NULL);
+    lqi_header_t* header = getHeader(msg);
 
     header->originaddr = TOS_NODE_ID;
     header->originseqno = gOriginSeqNo++;