]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/mac/tkn154/AssociateP.nc
- reduced RAM usage of the beacon sync component
[tinyos-2.x.git] / tos / lib / mac / tkn154 / AssociateP.nc
index d5296c8706a381b63938b8a0005cd43964f1f0bf..494745fb8352b9c0f07ea0688e79cd9e1687174e 100644 (file)
@@ -204,9 +204,11 @@ implementation
     if (m_associationOngoing) {
       call ResponseTimeout.stop();
       m_associationOngoing = FALSE;
+      if (m_assocRespStatus == IEEE154_ASSOCIATION_SUCCESSFUL)
+        call MLME_SET.macShortAddress(m_shortAddress);
       signal MLME_ASSOCIATE.confirm(m_shortAddress, m_assocRespStatus, 0);
-      dbg_serial("AssociationP", "confirm: %lx, %lu\n", 
-          (uint32_t) m_shortAddress, (uint32_t) m_assocRespStatus);
+      dbg_serial("AssociationP", "confirm, status:  %lu, my new address: 0x%lx\n", 
+          (uint32_t) m_assocRespStatus, (uint32_t) m_shortAddress);
     }
   }