Skip to content

Commit

Permalink
Merge pull request #754 from skliper/fix753-rm_ut_checkforopensockets
Browse files Browse the repository at this point in the history
Fix #753, Remove UT_CheckForOpenSockets
  • Loading branch information
astrogeco authored Jan 25, 2021
2 parents 4165e67 + c968de0 commit 95cab23
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
23 changes: 0 additions & 23 deletions src/ut-stubs/utstub-helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,26 +184,3 @@ void UT_ObjIdDecompose(osal_id_t id, uint32 *indx, UT_ObjType_t *objtype)
*indx = idv & 0xFFFFUL;
*objtype = (idv >> 16) ^ 0x4000UL;
}

/*
** Report and close any sockets found open
** Moved here temporarily to ensure full compatibility with CFE implementation
**
** NOTE - this historically only checked for queues that were created but not
** cleaned up. Although the current impl could check for anything, only queues
** are done for now.
*/
void UT_CheckForOpenSockets(void)
{
UT_ObjTypeState_t *StatePtr;
uint32 i;

StatePtr = &UT_ObjState[UT_OBJTYPE_QUEUE];
for (i = 0; i <= StatePtr->LastIssueNumber; ++i)
{
if ((StatePtr->ValidBits[i >> 3] & (1 << (i & 0x07))) != 0)
{
UtAssert_Failed("UT_Queue %d left open.\n", (int)i);
}
}
}
6 changes: 0 additions & 6 deletions src/ut-stubs/utstub-helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ osal_id_t UT_AllocStubObjId(UT_ObjType_t ObjType);
*/
void UT_DeleteStubObjId(UT_ObjType_t ObjType, osal_id_t ObjId);

/*
* Helper function - Report any queue objects found open
* (for compatibility with CFE tests, only checks queues)
*/
void UT_CheckForOpenSockets(void);

/*
* Helper function - Clear all OSAL UT stub objects
* Resets the stub object table back to its initial/empty state
Expand Down

0 comments on commit 95cab23

Please sign in to comment.