forked from gatsby/datalink_repo
bugfix: correct the condition of transitioning to seek state.
This commit is contained in:
@@ -1043,13 +1043,12 @@ int32_t MgmtNet_Routine(L2_INST *instPtr, const L2_RTNE_TABLE_ENTRY *rtneEntry)
|
||||
L2_EVENT stateEvent = {
|
||||
.event = L2_EV_MAIN_STATE_UPDATE,
|
||||
.msg = &newState};
|
||||
if (L2_GetNodeListLen(instPtr->nodeList) < instPtr->config.netScale && L2_GetMainState(instPtr) != L2_INTRA_SEEK_STATE)
|
||||
if (L2_GetNodeListLen(instPtr->nodeList) < instPtr->config.netScale - 1)
|
||||
{
|
||||
newState = L2_INTRA_SEEK_STATE;
|
||||
AssertL2Event(instPtr, &stateEvent);
|
||||
}
|
||||
else if (L2_GetNodeListLen(instPtr->nodeList) >= instPtr->config.netScale &&
|
||||
L2_GetMainState(instPtr) != L2_NORMAL_STATE)
|
||||
else
|
||||
{
|
||||
newState = L2_NORMAL_STATE;
|
||||
AssertL2Event(instPtr, &stateEvent);
|
||||
|
||||
Reference in New Issue
Block a user