mirror of
https://github.com/espressif/openthread.git
synced 2026-08-21 09:59:52 +00:00
leader should keep its router id recorded (#257)
This commit is contained in:
@@ -224,6 +224,7 @@ ThreadError MleRouter::BecomeLeader(void)
|
||||
|
||||
mRouterId = (mPreviousRouterId != kMaxRouterId) ? AllocateRouterId(mPreviousRouterId) : AllocateRouterId();
|
||||
VerifyOrExit(mRouterId >= 0, error = kThreadError_NoBufs);
|
||||
mPreviousRouterId = mRouterId;
|
||||
|
||||
memcpy(&mRouters[mRouterId].mMacAddr, mMac.GetExtAddress(), sizeof(mRouters[mRouterId].mMacAddr));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user