Skip to content

Commit

Permalink
Fix nasa#657, Register context in SendEvent and SysLog stubs
Browse files Browse the repository at this point in the history
Add missing UT_Stub_RegisterContext to CFE_EVS_SendEvent and CFE_ES_WriteToSysLog.
This will create the correct register buffer size.
  • Loading branch information
jtovias authored and skliper committed May 19, 2020
1 parent 95f34d2 commit 84e10c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions fsw/cfe-core/ut-stubs/ut_es_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ int32 CFE_ES_RegisterChildTask(void)
int32 CFE_ES_WriteToSysLog(const char *pSpecString, ...)
{
int32 status;
UT_Stub_RegisterContext(UT_KEY(CFE_ES_WriteToSysLog), pSpecString); // allow this input to be used by hook functions

status = UT_DEFAULT_IMPL(CFE_ES_WriteToSysLog);

Expand Down
2 changes: 2 additions & 0 deletions fsw/cfe-core/ut-stubs/ut_evs_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ int32 CFE_EVS_SendEvent(uint16 EventID,
int32 status;

UT_Stub_RegisterContext(UT_KEY(CFE_EVS_SendEvent), &EventID);
UT_Stub_RegisterContext(UT_KEY(CFE_EVS_SendEvent), &EventType);
UT_Stub_RegisterContext(UT_KEY(CFE_EVS_SendEvent), Spec);
status = UT_DEFAULT_IMPL(CFE_EVS_SendEvent);

if (status >= 0)
Expand Down

0 comments on commit 84e10c5

Please sign in to comment.