diff --git a/src/core/rbuscore.c b/src/core/rbuscore.c index 3687b08d..fcb00263 100644 --- a/src/core/rbuscore.c +++ b/src/core/rbuscore.c @@ -2297,7 +2297,6 @@ rbusCoreError_t rbuscore_discoverRegisteredComponents(int * count, char *** comp } rtMessage_Release(msg); - rtMessage_Release(out); ret = RBUSCORE_SUCCESS; } else @@ -2305,7 +2304,8 @@ rbusCoreError_t rbuscore_discoverRegisteredComponents(int * count, char *** comp RBUSCORELOG_ERROR("Failed with error code %d", err); ret = RBUSCORE_ERROR_GENERAL; } - + + rtMessage_Release(out); return ret; } diff --git a/src/rbus/rbus.c b/src/rbus/rbus.c index a73d784a..cbac7b1c 100644 --- a/src/rbus/rbus.c +++ b/src/rbus/rbus.c @@ -3493,7 +3493,7 @@ rbusError_t rbus_getExt(rbusHandle_t handle, int paramCount, char const** pParam } else { - rbusProperty_t tmpProperties; + rbusProperty_t tmpProperties = NULL; if((errorcode = _getExt_response_parser(response, &tmpNumOfValues, &tmpProperties)) != RBUS_ERROR_SUCCESS) { @@ -3531,8 +3531,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 @@ -3633,7 +3641,7 @@ rbusError_t rbus_getExt(rbusHandle_t handle, int paramCount, char const** pParam } else { - rbusProperty_t batchResult; + rbusProperty_t batchResult = NULL; int batchNumVals; if((errorcode = _getExt_response_parser(response, &batchNumVals, &batchResult)) != RBUS_ERROR_SUCCESS) { diff --git a/utils/rbuscli/rbuscli.c b/utils/rbuscli/rbuscli.c index fd3cb810..01b54b14 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); }