Skip to content

Commit

Permalink
RDKB-55856:DM is not working with CPE interface alias name
Browse files Browse the repository at this point in the history
Reason for change: The getExt function returns a success error code if it is partially successful.
Signed-off-by: Netaji Panigrahi [email protected]
  • Loading branch information
NetajiPanigrahi authored Jun 21, 2024
1 parent 2edc240 commit 7b83e71
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
10 changes: 9 additions & 1 deletion src/rbus/rbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -3532,8 +3532,16 @@ rbusError_t rbus_getExt(rbusHandle_t handle, int paramCount, char const** pParam
for(i = 0; i < numDestinations; i++)
free(destinations[i]);
free(destinations);
if ((*retProperties != NULL) && (errorcode != RBUS_ERROR_SUCCESS))
{
RBUSLOG_WARN("Query for expression %s was partially successful", pParamNames[0]);
return RBUS_ERROR_SUCCESS;
}
else
{
return errorcode;
}

return errorcode;
}
}
else
Expand Down
36 changes: 18 additions & 18 deletions utils/rbuscli/rbuscli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ void validate_and_execute_get_cmd (int argc, char *argv[])
rc = rbus_getExt(g_busHandle, numOfInputParams, pInputParam, &numOfOutVals, &outputVals);
}

if(RBUS_ERROR_SUCCESS == rc)
if((RBUS_ERROR_SUCCESS == rc) && (outputVals != NULL))
{
rbusProperty_t next = outputVals;
for (i = 0; i < numOfOutVals; i++)
Expand All @@ -1204,23 +1204,23 @@ void validate_and_execute_get_cmd (int argc, char *argv[])
rbusValueType_t type = rbusValue_GetType(val);
char *pStrVal = rbusValue_ToString(val,NULL,0);

if ((strcmp("-g", argv[1]) == 0))
{
printf ("%s\n", pStrVal);
}
else
{
printf ("Parameter %2d:\n\r", i+1);
printf (" Name : %s\n\r", rbusProperty_GetName(next));
printf (" Type : %s\n\r", getDataType_toString(type));
printf (" Value : %s\n\r", pStrVal);
}
if(pStrVal)
{
free(pStrVal);
}
next = rbusProperty_GetNext(next);
}
if ((strcmp("-g", argv[1]) == 0))
{
printf ("%s\n", pStrVal);
}
else
{
printf ("Parameter %2d:\n\r", i+1);
printf (" Name : %s\n\r", rbusProperty_GetName(next));
printf (" Type : %s\n\r", getDataType_toString(type));
printf (" Value : %s\n\r", pStrVal);
}
if(pStrVal)
{
free(pStrVal);
}
next = rbusProperty_GetNext(next);
}
/* Free the memory */
rbusProperty_Release(outputVals);
}
Expand Down

0 comments on commit 7b83e71

Please sign in to comment.