]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/mac/tkn154/AssociateP.nc
- macShortAddress PIB attribute is now updated automatically after a successful assoc...
[tinyos-2.x.git] / tos / lib / mac / tkn154 / AssociateP.nc
index d5296c8706a381b63938b8a0005cd43964f1f0bf..3d697f65d474fbe0f8717ff43471373f6d3c078b 100644 (file)
@@ -204,6 +204,8 @@ 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);