]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/mac/tkn154/IndirectTxP.nc
- bugfix: empty data frame sent in response to a datarequest (somtimes) had wrong...
[tinyos-2.x.git] / tos / lib / mac / tkn154 / IndirectTxP.nc
index 36d1988de4eea2aed27fe3998f97b71dd51c2a49..c404bcec7932ae8182749e0e9137eb72843f84b9 100644 (file)
@@ -236,11 +236,11 @@ implementation
     }
     if (dataResponseFrame != NULL) {
       // found a matching frame, mark it for transmission
-      dbg_serial("IndirectTxP", "We have data for this device, trying to transmit...");
+      dbg_serial("IndirectTxP", "We have data for this device, trying to transmit...\n");
       dataResponseFrame->client |= SEND_THIS_FRAME;
       post tryCoordCapTxTask();
     } else {
-      dbg_serial("IndirectTxP", "We don't have data for this device, sending an empty frame...");
+      dbg_serial("IndirectTxP", "We don't have data for this device, sending an empty frame...\n");
       transmitEmptyDataFrame(frame);
     }
     return frame;
@@ -267,7 +267,7 @@ implementation
         NULL //security
         );
     MHR(&m_emptyDataFrame)[MHR_INDEX_FC1] |= FC1_FRAMETYPE_DATA;
-    m_emptyDataFrame.headerLen = 9;
+    m_emptyDataFrame.headerLen = call IEEE154Frame.getHeaderLength(emptyDataMsg);
     m_emptyDataFrame.client = 1; // lock
     if (call CoordCapTx.transmit(&m_emptyDataFrame) != IEEE154_SUCCESS)
       m_emptyDataFrame.client = 0; // unlock