Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cFE Integration candidate: 2021-01-19 #1109

Merged
merged 40 commits into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ad74393
Fix #1074, Refactor CFE_TIME_RegisterSynchCallback
skliper Jan 7, 2021
73717b8
Fix #449, Add OS_printf to CFE_ES_SYSLOG_APPEND
skliper Jan 7, 2021
778aafb
Fix #488, Pad msg headers to 64 bit
skliper Jan 7, 2021
856c88a
Fix #903, Add CFE_SB_GetUserData padding check
skliper Sep 23, 2020
1b31bd9
Fix #877, Remove duplicate CFE_MISSION_REV define
skliper Jan 11, 2021
483b7c0
Fix #901, Remove UT_CheckForOpenSockets references
skliper Jan 11, 2021
a32ed2a
Fix #904, Update cpuname targets.cmake documentation
skliper Jan 11, 2021
ad9ae56
Fix #1090, UT event check bounds
jphickey Jan 12, 2021
266ed95
Fix #1052, Refactor UT_ClearForceFail to UT_ClearDefaultReturnValue
zanzaben Jan 4, 2021
63b4347
Fix #1068, Create Security Policy
arielswalker Dec 17, 2020
3852145
Fix #933, Remove SenderReporting from SB global
skliper Jan 14, 2021
6b5f77a
Fix #985, globalize "resource ID" definitions
jphickey Jan 12, 2021
b17cd1e
Fix #1073, refactor SB API for proper global locks
jphickey Jan 12, 2021
21bf38a
Fix #945, Finish CFE_PLATFORM_ES_PERF_MAX_IDS removal
skliper Jan 19, 2021
d1c5ab0
Fix #954, Handle debug events in unit test
skliper Jan 19, 2021
fc97a62
Fix #955, Remove OS_printf stub count checks in UT
skliper Jan 19, 2021
4d406db
Merge pull request #1048 from ArielSAdamsNASA/main
astrogeco Jan 21, 2021
8559cf3
Merge pull request #1086 from skliper/fix904-cpuname_doc
astrogeco Jan 21, 2021
0658a01
Merge pull request #1091 from jphickey/fix-1090-ut-eventcheck-bounds
astrogeco Jan 21, 2021
bd87123
Merge pull request #1076 from skliper/fix449-consistent_log
astrogeco Jan 21, 2021
f9abb48
Merge pull request #1099 from skliper/fix933-rm_senderreporting
astrogeco Jan 21, 2021
9f8a776
Merge pull request #1106 from skliper/fix954-test_w_debug_events
astrogeco Jan 21, 2021
c403d0e
Merge pull request #1085 from skliper/fix901-rm-ut-checkforopensockets
astrogeco Jan 21, 2021
6618ce1
Merge pull request #1053 from zanzaben/fix1052_Rename_UT_ClearForceFail
astrogeco Jan 22, 2021
6ca043d
Merge pull request #905 from skliper/fix903-getuserdata-padcheck
astrogeco Jan 25, 2021
a68947e
Merge pull request #1077 from skliper/fix488-header_alignment
astrogeco Jan 25, 2021
c9f9d42
Merge pull request #1075 from skliper/fix1074-multiple_returns
astrogeco Jan 25, 2021
95ec2da
Merge pull request #1092 from jphickey/fix-1073-sb-locking
astrogeco Jan 25, 2021
1927e61
Merge pull request #1107 from skliper/fix955-os_printf_count
astrogeco Jan 25, 2021
5b1d054
Merge pull request #1084 from skliper/fix877-one_missionrev_2_rule_th…
astrogeco Jan 25, 2021
cc514bc
Merge pull request #1104 from skliper/fix945-platform_perf_max_id
astrogeco Jan 25, 2021
28c746c
Fix #1089, Cleanup strncpy use - unit tests
skliper Jan 12, 2021
5edcf20
Fix #1089, Cleanup strncpy use - main code
skliper Jan 13, 2021
26a0e06
Fix #932, Update UT for CFE_MISSION* string sizing
skliper Jan 14, 2021
a4aa481
Merge pull request #1098 from skliper/fix1089-clean_strncpy
astrogeco Jan 25, 2021
137768d
Fix #982, use separate pipe info data struct
jphickey Jan 15, 2021
79cfde6
Merge pull request #1102 from jphickey/fix-982-separate-pipeinfo
astrogeco Jan 26, 2021
383438d
Fix #1134, Add UtDebug output to CFE_ES_WriteToSysLog stub
skliper Jan 26, 2021
a991e96
Merge pull request #1135 from skliper/fix1134-writetosyslog_utdebug
astrogeco Jan 26, 2021
f221911
Bump to v6.8.0-rc1+dev290
astrogeco Jan 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions fsw/cfe-core/src/es/cfe_es_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ int32 CFE_ES_GetAppName(char *AppName, CFE_ES_ResourceID_t AppId, size_t BufferL
*/
if (CFE_ES_AppRecordIsMatch(AppRecPtr, AppId))
{
strncpy(AppName, CFE_ES_AppRecordGetName(AppRecPtr), BufferLength);
strncpy(AppName, CFE_ES_AppRecordGetName(AppRecPtr), BufferLength - 1);
AppName[BufferLength - 1] = '\0';
Result = CFE_SUCCESS;
}
Expand Down Expand Up @@ -1306,8 +1306,8 @@ int32 CFE_ES_CreateChildTask(CFE_ES_ResourceID_t *TaskIdPtr,

CFE_ES_TaskRecordSetUsed(TaskRecPtr, ChildTaskId);
TaskRecPtr->AppId = CFE_ES_AppRecordGetID(AppRecPtr);
strncpy((char *)TaskRecPtr->TaskName,TaskName,OS_MAX_API_NAME);
TaskRecPtr->TaskName[OS_MAX_API_NAME - 1] = '\0';
strncpy(TaskRecPtr->TaskName,TaskName,sizeof(TaskRecPtr->TaskName) - 1);
TaskRecPtr->TaskName[sizeof(TaskRecPtr->TaskName) - 1] = '\0';
CFE_ES_Global.RegisteredTasks++;

*TaskIdPtr = ChildTaskId;
Expand Down Expand Up @@ -1737,8 +1737,8 @@ int32 CFE_ES_RegisterCDS(CFE_ES_CDSHandle_t *CDSHandlePtr, size_t BlockSize, con

/* Perform a buffer overrun safe copy of name for debug log message */

strncpy(CDSName, Name, CFE_MISSION_ES_CDS_MAX_NAME_LENGTH);
CDSName[CFE_MISSION_ES_CDS_MAX_NAME_LENGTH-1] = '\0';
strncpy(CDSName, Name, sizeof(CDSName) - 1);
CDSName[sizeof(CDSName) - 1] = '\0';
CFE_ES_WriteToSysLog("CFE_CDS:Register-CDS Name (%s) is too long\n", CDSName);
}
else
Expand Down Expand Up @@ -1925,7 +1925,8 @@ int32 CFE_ES_RegisterGenCounter(CFE_ES_ResourceID_t *CounterIdPtr, const char *C
else
{
strncpy(CountRecPtr->CounterName,CounterName,
sizeof(CountRecPtr->CounterName));
sizeof(CountRecPtr->CounterName) - 1);
CountRecPtr->CounterName[sizeof(CountRecPtr->CounterName) - 1] = '\0';
CountRecPtr->Counter = 0;
CFE_ES_CounterRecordSetUsed(CountRecPtr, PendingCounterId);
CFE_ES_Global.LastCounterId = PendingCounterId;
Expand Down
7 changes: 7 additions & 0 deletions fsw/cfe-core/src/es/cfe_es_apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,12 +707,16 @@ int32 CFE_ES_AppCreate(CFE_ES_ResourceID_t *ApplicationIdPtr,
AppRecPtr->Type = CFE_ES_AppType_EXTERNAL;
strncpy(AppRecPtr->StartParams.BasicInfo.Name, AppName,
sizeof(AppRecPtr->StartParams.BasicInfo.Name)-1);
AppRecPtr->StartParams.BasicInfo.Name[sizeof(AppRecPtr->StartParams.BasicInfo.Name)-1] = '\0';
strncpy(AppRecPtr->StartParams.BasicInfo.FileName, FileName,
sizeof(AppRecPtr->StartParams.BasicInfo.FileName)-1);
AppRecPtr->StartParams.BasicInfo.FileName[sizeof(AppRecPtr->StartParams.BasicInfo.FileName)-1] = '\0';
if (EntryPointName != NULL && strcmp(EntryPointName, "NULL") != 0)
{
strncpy(AppRecPtr->StartParams.BasicInfo.EntryPoint, EntryPointName,
sizeof(AppRecPtr->StartParams.BasicInfo.EntryPoint)-1);
AppRecPtr->StartParams.BasicInfo.EntryPoint[
sizeof(AppRecPtr->StartParams.BasicInfo.EntryPoint)-1] = '\0';
}

AppRecPtr->StartParams.StackSize = StackSize;
Expand Down Expand Up @@ -883,12 +887,15 @@ int32 CFE_ES_LoadLibrary(CFE_ES_ResourceID_t *LibraryIdPtr,
*/
strncpy(LibSlotPtr->BasicInfo.Name, LibName,
sizeof(LibSlotPtr->BasicInfo.Name)-1);
LibSlotPtr->BasicInfo.Name[sizeof(LibSlotPtr->BasicInfo.Name)-1] = '\0';
strncpy(LibSlotPtr->BasicInfo.FileName, FileName,
sizeof(LibSlotPtr->BasicInfo.FileName)-1);
LibSlotPtr->BasicInfo.FileName[sizeof(LibSlotPtr->BasicInfo.FileName)-1] = '\0';
if (EntryPointName != NULL && strcmp(EntryPointName, "NULL") != 0)
{
strncpy(LibSlotPtr->BasicInfo.EntryPoint, EntryPointName,
sizeof(LibSlotPtr->BasicInfo.EntryPoint)-1);
LibSlotPtr->BasicInfo.EntryPoint[sizeof(LibSlotPtr->BasicInfo.EntryPoint)-1] = '\0';
}

CFE_ES_LibRecordSetUsed(LibSlotPtr, CFE_ES_RESOURCEID_RESERVED);
Expand Down
3 changes: 2 additions & 1 deletion fsw/cfe-core/src/es/cfe_es_erlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ int32 CFE_ES_WriteToERLogWithContext( CFE_ES_LogEntryType_Enum_t EntryType, ui
/*
** Copy the Description string to the log.
*/
strncpy(EntryPtr->BaseInfo.Description, Description, sizeof(EntryPtr->BaseInfo.Description));
strncpy(EntryPtr->BaseInfo.Description, Description, sizeof(EntryPtr->BaseInfo.Description) - 1);
EntryPtr->BaseInfo.Description[sizeof(EntryPtr->BaseInfo.Description) - 1] = '\0';

/*
* Store the context info (if any)
Expand Down
1 change: 1 addition & 0 deletions fsw/cfe-core/src/es/cfe_es_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ void CFE_ES_CreateObjects(void)
AppRecPtr->Type = CFE_ES_AppType_CORE;
strncpy(AppRecPtr->StartParams.BasicInfo.Name, CFE_ES_ObjectTable[i].ObjectName,
sizeof(AppRecPtr->StartParams.BasicInfo.Name)-1);
AppRecPtr->StartParams.BasicInfo.Name[sizeof(AppRecPtr->StartParams.BasicInfo.Name)-1] = '\0';

/* FileName and EntryPoint is not valid for core apps */
AppRecPtr->StartParams.StackSize = CFE_ES_ObjectTable[i].ObjectSize;
Expand Down
15 changes: 3 additions & 12 deletions fsw/cfe-core/src/es/cfe_es_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,6 @@ int32 CFE_ES_TaskInit(void)
CFE_ES_TaskData.CommandCounter = 0;
CFE_ES_TaskData.CommandErrorCounter = 0;

/*
** Initialize task configuration data
*/
strcpy(CFE_ES_TaskData.PipeName, "ES_CMD_PIPE");
CFE_ES_TaskData.PipeDepth = 12;

CFE_ES_TaskData.LimitHK = 2;
CFE_ES_TaskData.LimitCmd = 4;

/*
** Initialize systemlog to default Power On or Processor Reset mode
*/
Expand Down Expand Up @@ -271,7 +262,7 @@ int32 CFE_ES_TaskInit(void)
/*
** Create Software Bus message pipe
*/
Status = CFE_SB_CreatePipe(&CFE_ES_TaskData.CmdPipe, CFE_ES_TaskData.PipeDepth, CFE_ES_TaskData.PipeName);
Status = CFE_SB_CreatePipe(&CFE_ES_TaskData.CmdPipe, CFE_ES_PIPE_DEPTH, CFE_ES_PIPE_NAME);
if ( Status != CFE_SUCCESS )
{
CFE_ES_WriteToSysLog("ES:Cannot Create SB Pipe, RC = 0x%08X\n", (unsigned int)Status);
Expand All @@ -282,7 +273,7 @@ int32 CFE_ES_TaskInit(void)
** Subscribe to Housekeeping request commands
*/
Status = CFE_SB_SubscribeEx(CFE_SB_ValueToMsgId(CFE_ES_SEND_HK_MID), CFE_ES_TaskData.CmdPipe,
CFE_SB_Default_Qos, CFE_ES_TaskData.LimitHK);
CFE_SB_Default_Qos, CFE_ES_LIMIT_HK);
if ( Status != CFE_SUCCESS )
{
CFE_ES_WriteToSysLog("ES:Cannot Subscribe to HK packet, RC = 0x%08X\n", (unsigned int)Status);
Expand All @@ -293,7 +284,7 @@ int32 CFE_ES_TaskInit(void)
** Subscribe to ES task ground command packets
*/
Status = CFE_SB_SubscribeEx(CFE_SB_ValueToMsgId(CFE_ES_CMD_MID), CFE_ES_TaskData.CmdPipe,
CFE_SB_Default_Qos, CFE_ES_TaskData.LimitCmd);
CFE_SB_Default_Qos, CFE_ES_LIMIT_CMD);
if ( Status != CFE_SUCCESS )
{
CFE_ES_WriteToSysLog("ES:Cannot Subscribe to ES ground commands, RC = 0x%08X\n", (unsigned int)Status);
Expand Down
8 changes: 5 additions & 3 deletions fsw/cfe-core/src/es/cfe_es_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@

/*************************************************************************/

#define CFE_ES_PIPE_NAME "ES_CMD_PIPE"
#define CFE_ES_PIPE_DEPTH 12
#define CFE_ES_LIMIT_HK 2
#define CFE_ES_LIMIT_CMD 4

/*
** ES File descriptions
*/
Expand Down Expand Up @@ -123,9 +128,6 @@ typedef struct
/*
** ES Task initialization data (not reported in housekeeping)
*/
char PipeName[OS_MAX_API_NAME];
uint16 PipeDepth;

uint8 LimitHK;
uint8 LimitCmd;

Expand Down
8 changes: 4 additions & 4 deletions fsw/cfe-core/src/sb/cfe_sb_priv.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,10 @@ char *CFE_SB_GetAppTskName(CFE_ES_ResourceID_t TaskId,char *FullName){
}else{

/* AppName and TskName buffers and strncpy are needed to limit string sizes */
strncpy(AppName,(char *)ptr->AppName,OS_MAX_API_NAME-1);
AppName[OS_MAX_API_NAME-1] = '\0';
strncpy(TskName,(char *)ptr->TaskName,OS_MAX_API_NAME-1);
TskName[OS_MAX_API_NAME-1] = '\0';
strncpy(AppName,(char *)ptr->AppName,sizeof(AppName)-1);
AppName[sizeof(AppName)-1] = '\0';
strncpy(TskName,(char *)ptr->TaskName,sizeof(TskName)-1);
TskName[sizeof(TskName)-1] = '\0';

sprintf(FullName,"%s.%s",AppName,TskName);

Expand Down
27 changes: 17 additions & 10 deletions fsw/cfe-core/src/tbl/cfe_tbl_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ int32 CFE_TBL_Register( CFE_TBL_Handle_t *TblHandlePtr,
Status = CFE_TBL_ERR_INVALID_NAME;

/* Perform a buffer overrun safe copy of name for debug log message */
strncpy(TblName, Name, CFE_MISSION_TBL_MAX_NAME_LENGTH);
TblName[CFE_MISSION_TBL_MAX_NAME_LENGTH-1] = '\0';
strncpy(TblName, Name, sizeof(TblName) - 1);
TblName[sizeof(TblName) - 1] = '\0';
CFE_ES_WriteToSysLog("CFE_TBL:Register-Table Name (%s) is bad length (%d)",TblName,(int)NameLen);
}
else
Expand Down Expand Up @@ -314,7 +314,8 @@ int32 CFE_TBL_Register( CFE_TBL_Handle_t *TblHandlePtr,
RegRecPtr->ValidationFuncPtr = TblValidationFuncPtr;

/* Save Table Name in Registry */
strncpy(RegRecPtr->Name, TblName, CFE_TBL_MAX_FULL_NAME_LEN);
strncpy(RegRecPtr->Name, TblName, sizeof(RegRecPtr->Name) - 1);
RegRecPtr->Name[sizeof(RegRecPtr->Name) - 1] = '\0';

/* Set the "Dump Only" flag to value based upon selected option */
if ((TblOptionFlags & CFE_TBL_OPT_LD_DMP_MSK) == CFE_TBL_OPT_DUMP_ONLY)
Expand Down Expand Up @@ -398,10 +399,14 @@ int32 CFE_TBL_Register( CFE_TBL_Handle_t *TblHandlePtr,

if ((CritRegRecPtr != NULL) && (CritRegRecPtr->TableLoadedOnce))
{
strncpy(WorkingBufferPtr->DataSource, CritRegRecPtr->LastFileLoaded, OS_MAX_PATH_LEN);
strncpy(WorkingBufferPtr->DataSource, CritRegRecPtr->LastFileLoaded,
sizeof(WorkingBufferPtr->DataSource) - 1);
WorkingBufferPtr->DataSource[sizeof(WorkingBufferPtr->DataSource) - 1] = '\0';
WorkingBufferPtr->FileCreateTimeSecs = CritRegRecPtr->FileCreateTimeSecs;
WorkingBufferPtr->FileCreateTimeSubSecs = CritRegRecPtr->FileCreateTimeSubSecs;
strncpy(RegRecPtr->LastFileLoaded, CritRegRecPtr->LastFileLoaded, OS_MAX_PATH_LEN);
strncpy(RegRecPtr->LastFileLoaded, CritRegRecPtr->LastFileLoaded,
sizeof(RegRecPtr->LastFileLoaded) - 1);
RegRecPtr->LastFileLoaded[sizeof(RegRecPtr->LastFileLoaded) - 1] = '\0';
RegRecPtr->TimeOfLastUpdate.Seconds = CritRegRecPtr->TimeOfLastUpdate.Seconds;
RegRecPtr->TimeOfLastUpdate.Subseconds = CritRegRecPtr->TimeOfLastUpdate.Subseconds;
RegRecPtr->TableLoadedOnce = CritRegRecPtr->TableLoadedOnce;
Expand Down Expand Up @@ -441,7 +446,8 @@ int32 CFE_TBL_Register( CFE_TBL_Handle_t *TblHandlePtr,
if (CritRegRecPtr != NULL)
{
CritRegRecPtr->CDSHandle = RegRecPtr->CDSHandle;
strncpy(CritRegRecPtr->Name, TblName, CFE_TBL_MAX_FULL_NAME_LEN);
strncpy(CritRegRecPtr->Name, TblName, sizeof(CritRegRecPtr->Name) - 1);
CritRegRecPtr->Name[sizeof(CritRegRecPtr->Name) - 1] = '\0';
CritRegRecPtr->FileCreateTimeSecs = 0;
CritRegRecPtr->FileCreateTimeSubSecs = 0;
CritRegRecPtr->LastFileLoaded[0] = '\0';
Expand Down Expand Up @@ -874,7 +880,8 @@ int32 CFE_TBL_Load( CFE_TBL_Handle_t TblHandle,
/* On initial loads, make sure registry is given file/address of data source */
strncpy(RegRecPtr->LastFileLoaded,
WorkingBufferPtr->DataSource,
OS_MAX_PATH_LEN);
sizeof(RegRecPtr->LastFileLoaded) - 1);
RegRecPtr->LastFileLoaded[sizeof(RegRecPtr->LastFileLoaded) - 1] = '\0';

CFE_TBL_NotifyTblUsersOfUpdate(RegRecPtr);

Expand Down Expand Up @@ -1494,7 +1501,7 @@ int32 CFE_TBL_Modified( CFE_TBL_Handle_t TblHandle )

/* Keep a record of change for the ground operators reference */
RegRecPtr->TimeOfLastUpdate = CFE_TIME_GetTime();
RegRecPtr->LastFileLoaded[OS_MAX_PATH_LEN-1] = '\0';
RegRecPtr->LastFileLoaded[sizeof(RegRecPtr->LastFileLoaded)-1] = '\0';

/* Update CRC on contents of table */
RegRecPtr->Buffers[RegRecPtr->ActiveBufferIndex].Crc =
Expand All @@ -1504,13 +1511,13 @@ int32 CFE_TBL_Modified( CFE_TBL_Handle_t TblHandle )
CFE_MISSION_ES_DEFAULT_CRC);

FilenameLen = strlen(RegRecPtr->LastFileLoaded);
if (FilenameLen < (OS_MAX_PATH_LEN-4))
if (FilenameLen < (sizeof(RegRecPtr->LastFileLoaded)-4))
{
strncpy(&RegRecPtr->LastFileLoaded[FilenameLen], "(*)", 4);
}
else
{
strncpy(&RegRecPtr->LastFileLoaded[(OS_MAX_PATH_LEN-4)], "(*)", 4);
strncpy(&RegRecPtr->LastFileLoaded[sizeof(RegRecPtr->LastFileLoaded)-4], "(*)", 4);
}

AccessIterator = RegRecPtr->HeadOfAccessList;
Expand Down
10 changes: 6 additions & 4 deletions fsw/cfe-core/src/tbl/cfe_tbl_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1002,8 +1002,8 @@ int32 CFE_TBL_LoadFromFile(const char *AppName, CFE_TBL_LoadBuff_t *WorkingBuffe
return CFE_TBL_ERR_FILE_TOO_LARGE;
}

memset(WorkingBufferPtr->DataSource, 0, OS_MAX_PATH_LEN);
strncpy(WorkingBufferPtr->DataSource, Filename, OS_MAX_PATH_LEN);
memset(WorkingBufferPtr->DataSource, 0, sizeof(WorkingBufferPtr->DataSource));
strncpy(WorkingBufferPtr->DataSource, Filename, sizeof(WorkingBufferPtr->DataSource) - 1);

/* Save file creation time for later storage into Registry */
WorkingBufferPtr->FileCreateTimeSecs = StdFileHeader.TimeSeconds;
Expand Down Expand Up @@ -1054,7 +1054,8 @@ int32 CFE_TBL_UpdateInternal( CFE_TBL_Handle_t TblHandle,
/* However, we need to copy it into active registry area */
strncpy(RegRecPtr->LastFileLoaded,
RegRecPtr->Buffers[RegRecPtr->ActiveBufferIndex].DataSource,
OS_MAX_PATH_LEN);
sizeof(RegRecPtr->LastFileLoaded) - 1);
RegRecPtr->LastFileLoaded[sizeof(RegRecPtr->LastFileLoaded) - 1] = '\0';

CFE_TBL_NotifyTblUsersOfUpdate(RegRecPtr);

Expand Down Expand Up @@ -1470,7 +1471,8 @@ void CFE_TBL_UpdateCriticalTblCDS(CFE_TBL_RegistryRec_t *RegRecPtr)
/* Save information related to the source of the data stored in the table in Critical Table Registry */
CritRegRecPtr->FileCreateTimeSecs = RegRecPtr->Buffers[RegRecPtr->ActiveBufferIndex].FileCreateTimeSecs;
CritRegRecPtr->FileCreateTimeSubSecs = RegRecPtr->Buffers[RegRecPtr->ActiveBufferIndex].FileCreateTimeSubSecs;
strncpy(CritRegRecPtr->LastFileLoaded, RegRecPtr->LastFileLoaded, OS_MAX_PATH_LEN);
strncpy(CritRegRecPtr->LastFileLoaded, RegRecPtr->LastFileLoaded, sizeof(CritRegRecPtr->LastFileLoaded) - 1);
CritRegRecPtr->LastFileLoaded[sizeof(CritRegRecPtr->LastFileLoaded) - 1] = '\0';
CritRegRecPtr->TimeOfLastUpdate = RegRecPtr->TimeOfLastUpdate;
CritRegRecPtr->TableLoadedOnce = RegRecPtr->TableLoadedOnce;

Expand Down
8 changes: 1 addition & 7 deletions fsw/cfe-core/src/tbl/cfe_tbl_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ int32 CFE_TBL_TaskInit(void)
/*
** Create Software Bus message pipe
*/
Status = CFE_SB_CreatePipe(&CFE_TBL_TaskData.CmdPipe,
CFE_TBL_TaskData.PipeDepth,
CFE_TBL_TaskData.PipeName);
Status = CFE_SB_CreatePipe(&CFE_TBL_TaskData.CmdPipe, CFE_TBL_TASK_PIPE_DEPTH, CFE_TBL_TASK_PIPE_NAME);
if(Status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("TBL:Error creating cmd pipe:RC=0x%08X\n",(unsigned int)Status);
Expand Down Expand Up @@ -241,10 +239,6 @@ void CFE_TBL_InitData(void)
/* Get the assigned Application ID for the Table Services Task */
CFE_ES_GetAppID(&CFE_TBL_TaskData.TableTaskAppId);

/* Initialize Command Pipe Parameters */
CFE_TBL_TaskData.PipeDepth = CFE_TBL_TASK_PIPE_DEPTH;
strncpy(CFE_TBL_TaskData.PipeName, CFE_TBL_TASK_PIPE_NAME, 16);

/* Initialize Packet Headers */
CFE_MSG_Init(&CFE_TBL_TaskData.HkPacket.TlmHeader.Msg,
CFE_SB_ValueToMsgId(CFE_TBL_HK_TLM_MID),
Expand Down
2 changes: 0 additions & 2 deletions fsw/cfe-core/src/tbl/cfe_tbl_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,6 @@ typedef struct
/*
** Task initialization data (not reported in housekeeping)...
*/
char PipeName[16]; /**< \brief Contains name of Table Task command pipe */
uint16 PipeDepth; /**< \brief Contains depth of Table Task command pipe */
CFE_ES_ResourceID_t TableTaskAppId; /**< \brief Contains Table Task Application ID as assigned by OS AL */

int16 HkTlmTblRegIndex; /**< \brief Index of table registry entry to be telemetered with Housekeeping */
Expand Down
8 changes: 6 additions & 2 deletions fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,13 @@ int32 CFE_TBL_LoadCmd(const CFE_TBL_LoadCmd_t *data)

/* Save file information statistics for housekeeping telemetry */
strncpy(CFE_TBL_TaskData.HkPacket.Payload.LastFileLoaded, LoadFilename,
sizeof(CFE_TBL_TaskData.HkPacket.Payload.LastFileLoaded));
sizeof(CFE_TBL_TaskData.HkPacket.Payload.LastFileLoaded) - 1);
CFE_TBL_TaskData.HkPacket.Payload.LastFileLoaded[
sizeof(CFE_TBL_TaskData.HkPacket.Payload.LastFileLoaded) - 1] = '\0';
strncpy(CFE_TBL_TaskData.HkPacket.Payload.LastTableLoaded, TblFileHeader.TableName,
sizeof(CFE_TBL_TaskData.HkPacket.Payload.LastTableLoaded));
sizeof(CFE_TBL_TaskData.HkPacket.Payload.LastTableLoaded) - 1);
CFE_TBL_TaskData.HkPacket.Payload.LastTableLoaded[
sizeof(CFE_TBL_TaskData.HkPacket.Payload.LastTableLoaded) - 1] = '\0';

/* Increment successful command completion counter */
ReturnCode = CFE_TBL_INC_CMD_CTR;
Expand Down
4 changes: 1 addition & 3 deletions fsw/cfe-core/src/time/cfe_time_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,7 @@ int32 CFE_TIME_TaskInit(void)
}/* end if */


Status = CFE_SB_CreatePipe(&CFE_TIME_TaskData.CmdPipe,
CFE_TIME_TaskData.PipeDepth,
CFE_TIME_TaskData.PipeName);
Status = CFE_SB_CreatePipe(&CFE_TIME_TaskData.CmdPipe, CFE_TIME_TASK_PIPE_DEPTH, CFE_TIME_TASK_PIPE_NAME);
if(Status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("TIME:Error creating cmd pipe:RC=0x%08X\n",(unsigned int)Status);
Expand Down
3 changes: 0 additions & 3 deletions fsw/cfe-core/src/time/cfe_time_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,6 @@ void CFE_TIME_InitData(void)
/*
** Initialize task configuration data...
*/
strcpy(CFE_TIME_TaskData.PipeName, CFE_TIME_TASK_PIPE_NAME);
CFE_TIME_TaskData.PipeDepth = CFE_TIME_TASK_PIPE_DEPTH;

memset((void*)CFE_TIME_TaskData.ReferenceState, 0, sizeof(CFE_TIME_TaskData.ReferenceState));
for (i = 0; i < CFE_TIME_REFERENCE_BUF_DEPTH; ++i)
{
Expand Down
3 changes: 0 additions & 3 deletions fsw/cfe-core/src/time/cfe_time_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ typedef struct
/*
** Task initialization data (not reported in housekeeping)...
*/
char PipeName[16];
uint16 PipeDepth;

int16 ClockSource;
int16 ClockSignal;
int16 ServerFlyState;
Expand Down
Loading