From 7b83e7158c98ef3fc17eae07dc6a7eca5bbb1ab0 Mon Sep 17 00:00:00 2001 From: Netaji Panigrahi <114923459+NetajiPanigrahi@users.noreply.github.com> Date: Fri, 21 Jun 2024 20:22:25 +0530 Subject: [PATCH] RDKB-55856:DM is not working with CPE interface alias name Reason for change: The getExt function returns a success error code if it is partially successful. Signed-off-by: Netaji Panigrahi Netaji_Panigrahi@comcast.com --- src/rbus/rbus.c | 10 +++++++++- utils/rbuscli/rbuscli.c | 36 ++++++++++++++++++------------------ 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/src/rbus/rbus.c b/src/rbus/rbus.c index a12965e1..8f5b565c 100644 --- a/src/rbus/rbus.c +++ b/src/rbus/rbus.c @@ -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 diff --git a/utils/rbuscli/rbuscli.c b/utils/rbuscli/rbuscli.c index 4ddf501f..20720abc 100644 --- a/utils/rbuscli/rbuscli.c +++ b/utils/rbuscli/rbuscli.c @@ -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++) @@ -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); }