Skip to content

rebase #120

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

Open
wants to merge 24 commits into
base: feature/RDKEMW-3380
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6edfc37
RDK-56115 : [RDKE] Fix coverity issues in RRD
Apr 1, 2025
29662b0
RDK-56115 : Fix for Uninitialised Variable
Apr 1, 2025
f9f44d0
Update rrdIarmEvents.c
Saranya2421 Apr 1, 2025
09006e0
RDk-56115 : Fix for L2 Test Failure
Apr 2, 2025
960b643
Merge branch 'feature/RDK-56115-coverity' of https://github.com/rdkce…
Apr 2, 2025
8f37f99
RDK-56115 : Coverity fix
Apr 2, 2025
6bfd977
RDK-56115 : Fix for coverity in RRD
Apr 2, 2025
4955236
RDK-56115 : Coverity fix
Apr 2, 2025
97e6a6e
RDK-56115: Coverity fix
Apr 2, 2025
e861d4c
RDK-56115 : Dynamic profile Test change
Apr 3, 2025
39b2796
RDK-56115 : Coverity Fix
Apr 3, 2025
b2d91ed
Update rrdJsonParser.c
Saranya2421 Apr 7, 2025
72bd2b1
Update rrdRunCmdThread.c
Saranya2421 Apr 7, 2025
c3c9c09
Merge branch 'develop' into feature/RDK-56115-coverity
Saranya2421 Apr 15, 2025
ffb99f1
Update test_rrd_debug_report_upload.py
Saranya2421 Apr 15, 2025
8163edc
Update test_rrd_debug_report_upload.py
Saranya2421 Apr 15, 2025
d5447f9
Update test_rrd_debug_report_upload.py
Saranya2421 Apr 17, 2025
cc28e73
Merge pull request #108 from rdkcentral/feature/RDK-56115-coverity
Saranya2421 Apr 21, 2025
33d4cd2
1.2.6 release changelog updates
Apr 28, 2025
76e82bc
Merge branch 'release/1.2.6'
Apr 28, 2025
81ef88a
Merge tag '1.2.6' into develop
Apr 28, 2025
e86dd66
RDK-56291 L2 Tests And Integration With CI for Remote Debugger Dynam…
Abhinavpv28 May 5, 2025
e33aa12
RDKEMW-3380 : Evaluate the Deepsleep Scenario for Static and Dynamic …
Abhinavpv28 May 12, 2025
9ce8a74
Revert " RDK-56291 L2 Tests And Integration With CI for Remote Debugg…
nhanasi May 13, 2025
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: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,25 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [1.2.6](https://github.com/rdkcentral/remote_debugger/compare/1.2.5...1.2.6)

- Feature/rdk 56115 coverity [`#108`](https://github.com/rdkcentral/remote_debugger/pull/108)
- [RDKE] L2 Tests And Integration With CI for Remote Debugger Dynamic Updates [`#98`](https://github.com/rdkcentral/remote_debugger/pull/98)
- RDKECMF-219 Enable component build workflow on Pull Request and remove unnecessary token [`#70`](https://github.com/rdkcentral/remote_debugger/pull/70)
- RDK-56451 [RDKE] Move tr69hostif L2 binary into common docker repo [`#104`](https://github.com/rdkcentral/remote_debugger/pull/104)
- RDK-56115 : [RDKE] Fix coverity issues in RRD [`6edfc37`](https://github.com/rdkcentral/remote_debugger/commit/6edfc376fbd899e2992ed2c26cdeb86351c925aa)
- RDK-56115 : Coverity fix [`4955236`](https://github.com/rdkcentral/remote_debugger/commit/49552366c6ff0d59024e3a449e3a52868a4222de)
- RDK-56115 : Coverity fix [`8f37f99`](https://github.com/rdkcentral/remote_debugger/commit/8f37f9936ec865d68eb05eb6f0137888cbdb627d)

#### [1.2.5](https://github.com/rdkcentral/remote_debugger/compare/1.2.4...1.2.5)

> 27 March 2025

- RDK-55702: Update the MW clients to use Power Manager Plugin [`#100`](https://github.com/rdkcentral/remote_debugger/pull/100)
- RDKEMW-1768 -Fix UT in RRD with Static profile update and Null Check [`#102`](https://github.com/rdkcentral/remote_debugger/pull/102)
- RDKECMF-219 Remove redundant variable [`#96`](https://github.com/rdkcentral/remote_debugger/pull/96)
- RDKB-58835-[Productisation] Enable RRD Dynamic Profile for RDKB platforms [`#88`](https://github.com/rdkcentral/remote_debugger/pull/88)
- 1.2.5 release changelog updates [`8c49b9c`](https://github.com/rdkcentral/remote_debugger/commit/8c49b9cd05f4c16c5ea2dea79963a2b81b697d6a)
- Merge tag '1.2.4' into develop [`9c234d3`](https://github.com/rdkcentral/remote_debugger/commit/9c234d33e7649424a503259411c749e024e8d986)

#### [1.2.4](https://github.com/rdkcentral/remote_debugger/compare/1.2.3...1.2.4)
Expand Down
2 changes: 1 addition & 1 deletion src/rrdDynamic.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void RRDRdmManagerDownloadRequest(issueNodeData *pissueStructNode, char *dynJSON
{
#ifdef IARMBUS_SUPPORT
if (isDeepSleepAwakeEvent)
strncpy(msgDataString, paramString, msgDataStringSize);
strncpy(msgDataString, paramString, (msgDataStringSize - strlen(RDM_PKG_SUFFIX)));
else
snprintf(msgDataString, msgDataStringSize, "%s%s", RDM_PKG_PREFIX, pissueStructNode->Node);
#else
Expand Down
10 changes: 7 additions & 3 deletions src/rrdEventProcess.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void processWebCfgTypeEvent(data_buf *rbuf)
*/
void processIssueTypeEvent(data_buf *rbuf)
{
char **cmdMap;
char **cmdMap = NULL;
int index = 0, count = 0, dataMsgLen = 0;
data_buf *cmdBuff = NULL;

Expand Down Expand Up @@ -190,6 +190,7 @@ static void processIssueType(data_buf *rbuf)
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Checking Issue from Static... \n", __FUNCTION__, __LINE__);
processIssueTypeInStaticProfile(rbuf, pIssueNode);
}
//CID-336989: Resource leak
}
else
{
Expand Down Expand Up @@ -295,9 +296,12 @@ static void processIssueTypeInStaticProfile(data_buf *rbuf, issueNodeData *pIssu
isStaticIssue = findIssueInParsedJSON(pIssueNode, jsonParsed);
if (isStaticIssue)
{
// Issue in Static Profile JSON
RDK_LOG(RDK_LOG_INFO, LOG_REMDEBUG, "[%s:%d]: Issue Data Node: %s and Sub-Node: %s found in Static JSON File %s... \n", __FUNCTION__, __LINE__, pIssueNode->Node, pIssueNode->subNode, RRD_JSON_FILE);
checkIssueNodeInfo(pIssueNode, jsonParsed, rbuf, false, NULL); // sanity Check and Get Command List
// CID 336988: Double free (USE_AFTER_FREE)
if(rbuf)
{
checkIssueNodeInfo(pIssueNode, jsonParsed, rbuf, false, NULL); // sanity Check and Get Command List
}
}
else
{
Expand Down
16 changes: 3 additions & 13 deletions src/rrdIarmEvents.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,14 @@ int RRD_IARM_subscribe()
void _pwrManagerEventHandler(const PowerController_PowerState_t currentState,
const PowerController_PowerState_t newState, void* userdata)
{
#if !defined(ENABLE_WEBCFG_FEATURE)
data_buf *sbuf = NULL;
int msgLen = strlen(DEEP_SLEEP_STR) + 1;
#endif
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: ...Entering.. currentState =%d, newState = %d\n", __FUNCTION__, __LINE__, currentState, newState);

if ((currentState == POWER_STATE_STANDBY_DEEP_SLEEP &&
newState != POWER_STATE_STANDBY_DEEP_SLEEP))
{
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Received state from Power Manager Current :[%d] New[%d] \n", __FUNCTION__, __LINE__, currentState, newState);
#ifdef ENABLE_WEBCFG_FEATURE
rbusError_t rc = RBUS_ERROR_BUS_ERROR;
rbusValue_t value;
rbusValue_Init(&value);
Expand All @@ -166,26 +163,24 @@ void _pwrManagerEventHandler(const PowerController_PowerState_t currentState,
return;
}
RDK_LOG(RDK_LOG_INFO, LOG_REMDEBUG, "[%s:%d]: Invoking WebCfg Force Sync: %s... \n", __FUNCTION__, __LINE__, RRD_WEBCFG_FORCE_SYNC);
#else
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Copying Message Received to the queue.. \n", __FUNCTION__, __LINE__);
sbuf = (data_buf *)malloc(sizeof(data_buf));
if (!sbuf)
{
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Memory Allocation Failed for EventId %d \n", __FUNCTION__, __LINE__, eventId);
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Memory Allocation Failed for EventId \n", __FUNCTION__, __LINE__);
return;
}

RRD_data_buff_init(sbuf, DEEPSLEEP_EVENT_MSG, RRD_DEEPSLEEP_RDM_DOWNLOAD_PKG_INITIATE);
sbuf->mdata = (char *)malloc(msgLen);
if (!sbuf->mdata)
{
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Memory Allocation Failed for EventId %d \n", __FUNCTION__, __LINE__, eventId);
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Memory Allocation Failed for EventId \n", __FUNCTION__, __LINE__);
RRD_data_buff_deAlloc(sbuf);
return;
}
strncpy((char *)sbuf->mdata, (const char *)DEEP_SLEEP_STR, msgLen);
RRDMsgDeliver(msqid, sbuf);
#endif
}
else
{
Expand All @@ -207,10 +202,8 @@ void _pwrManagerEventHandler(const PowerController_PowerState_t currentState,
void _pwrManagerEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len)
{
IARM_Bus_PWRMgr_EventData_t *eventData = NULL;
#if !defined(ENABLE_WEBCFG_FEATURE)
data_buf *sbuf = NULL;
int msgLen = strlen(DEEP_SLEEP_STR) + 1;
#endif
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: ...Entering.. \n", __FUNCTION__, __LINE__);

if (strcmp(owner, IARM_BUS_PWRMGR_NAME) == 0)
Expand All @@ -223,7 +216,6 @@ void _pwrManagerEventHandler(const char *owner, IARM_EventId_t eventId, void *da
{
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Event ID found for IARM_BUS_RDK_REMOTE_DEBUGGER_DEEPSLEEP_AWAKE %d \n", __FUNCTION__, __LINE__, eventId);
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Received state from Power Manager Current :[%d] New[%d] \n", __FUNCTION__, __LINE__, eventData->data.state.curState, eventData->data.state.newState);
#ifdef ENABLE_WEBCFG_FEATURE
rbusError_t rc = RBUS_ERROR_BUS_ERROR;
rbusValue_t value;
rbusValue_Init(&value);
Expand All @@ -235,7 +227,6 @@ void _pwrManagerEventHandler(const char *owner, IARM_EventId_t eventId, void *da
return;
}
RDK_LOG(RDK_LOG_INFO, LOG_REMDEBUG, "[%s:%d]: Invoking WebCfg Force Sync: %s... \n", __FUNCTION__, __LINE__, RRD_WEBCFG_FORCE_SYNC);
#else
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Copying Message Received to the queue.. \n", __FUNCTION__, __LINE__);
sbuf = (data_buf *)malloc(sizeof(data_buf));
if (!sbuf)
Expand All @@ -254,7 +245,7 @@ void _pwrManagerEventHandler(const char *owner, IARM_EventId_t eventId, void *da
}
strncpy((char *)sbuf->mdata, (const char *)DEEP_SLEEP_STR, msgLen);
RRDMsgDeliver(msqid, sbuf);
#endif
RRD_data_buff_deAlloc(sbuf);
}
else
{
Expand All @@ -268,7 +259,6 @@ void _pwrManagerEventHandler(const char *owner, IARM_EventId_t eventId, void *da
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: ...Exit.. \n", __FUNCTION__, __LINE__);
}
#endif

/*
* @function _rdmManagerEventHandler
* @brief Receives the RDM Manager event and sends the value as a message in the message-queue
Expand Down
7 changes: 7 additions & 0 deletions src/rrdJsonParser.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ char * readJsonFile(char *jsonfile)
if(ch_count < 1)
{
RDK_LOG(RDK_LOG_ERROR,LOG_REMDEBUG,"[%s:%d]: Json File %s is Empty!!! \n",__FUNCTION__,__LINE__,jsonfile);
// CID 278332: Resource leak (RESOURCE_LEAK)
fclose(fp);
return NULL;
}
fseek(fp, 0, SEEK_SET);
Expand Down Expand Up @@ -488,6 +490,11 @@ void checkIssueNodeInfo(issueNodeData *issuestructNode, cJSON *jsoncfg, data_buf
ctime = time (NULL);
ltime = localtime (&ctime);
dlen=snprintf(outdir,BUF_LEN_256,"%s%s-DebugReport-",RRD_OUTPUT_DIR,issuestructNode->Node);
RDK_LOG(RDK_LOG_DEBUG,LOG_REMDEBUG,"[%s:%d]: debug print issuestructNode->Node: %s !!! \n",__FUNCTION__,__LINE__, issuestructNode->Node);
if ((strcmp(issuestructNode->Node, DEEP_SLEEP_STR) == 0)|| (strcmp(issuestructNode->Node, "deepsleep")== 0))
{
isDeepSleepAwakeEventValid = true;
}
strftime (outdir + dlen, sizeof(outdir) - dlen, "%Y-%m-%d-%H-%M-%S", ltime);
RDK_LOG(RDK_LOG_DEBUG,LOG_REMDEBUG,"[%s:%d]: Creating Directory %s for Issue Category to store Output data...\n",__FUNCTION__,__LINE__,outdir);
if (mkdir(outdir,0777) != 0)
Expand Down