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);
}
}
for (i=0; i<MAX_PENDING_ASSOC_RESPONSES;i++)
if (m_payloadAssocResponse[i][0] == S_IDLE)
break;
- if (i == MAX_PENDING_ASSOC_RESPONSES || !(txFrame = call TxFramePool.get()))
+ if (security && security->SecurityLevel)
+ txStatus = IEEE154_UNSUPPORTED_SECURITY;
+ else if (i == MAX_PENDING_ASSOC_RESPONSES || !(txFrame = call TxFramePool.get()))
txStatus = IEEE154_TRANSACTION_OVERFLOW;
else if (!(txControl = call TxControlPool.get())) {
call TxFramePool.put(txFrame);