Skip to content

Commit

Permalink
[nes]: IF changes ...
Browse files Browse the repository at this point in the history
  • Loading branch information
nes-repo committed Dec 7, 2014
1 parent 9c04c2f commit d88ee75
Show file tree
Hide file tree
Showing 3 changed files with 436 additions and 6 deletions.
16 changes: 12 additions & 4 deletions if/ifMIB.c
Original file line number Diff line number Diff line change
Expand Up @@ -1629,7 +1629,7 @@ ifStackTable_removeEntry (ifStackEntry_t *poEntry)
}

xBTree_nodeRemove (&poEntry->oBTreeNode, &oIfStackTable_BTree);
xBTree_nodeRemove (&poEntry->oBTreeNode, &oIfStackTable_LToH_BTree);
xBTree_nodeRemove (&poEntry->oLToH_BTreeNode, &oIfStackTable_LToH_BTree);
xBuffer_free (poEntry); /* XXX - release any other internal resources */
return;
}
Expand All @@ -1651,7 +1651,7 @@ ifStackTable_createRegister (
ifStack_wrLock ();

if ((poEntry = ifStackTable_getByIndex (u32HigherLayer, u32LowerLayer)) == NULL &&
(poEntry = ifStackTable_createEntry (u32HigherLayer, u32LowerLayer)) == NULL)
(poEntry = ifStackTable_createExt (u32HigherLayer, u32LowerLayer)) == NULL)
{
goto ifStackTable_createRegister_cleanup;
}
Expand Down Expand Up @@ -1703,6 +1703,14 @@ ifStackTable_removeRegister (
goto ifStackTable_removeRegister_cleanup;
}

ifTable_unLock ();
bIfLocked = false;

if (!ifStackTable_removeExt (poEntry))
{
goto ifStackTable_removeRegister_cleanup;
}

bRetCode = true;

ifStackTable_removeRegister_cleanup:
Expand Down Expand Up @@ -2272,7 +2280,7 @@ ifRcvAddressTable_createRegister (
uint32_t u32Index,
uint8_t *pau8Address, size_t u16Address_len)
{
bool bRetCode = false;
register bool bRetCode = false;
register ifRcvAddressEntry_t *poEntry = NULL;

if (u32Index == ifIndex_zero_c ||
Expand Down Expand Up @@ -2309,7 +2317,7 @@ ifRcvAddressTable_removeRegister (
uint32_t u32Index,
uint8_t *pau8Address, size_t u16Address_len)
{
bool bRetCode = false;
register bool bRetCode = false;
register ifRcvAddressEntry_t *poEntry = NULL;

ifTable_rdLock ();
Expand Down

0 comments on commit d88ee75

Please sign in to comment.