
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1194894466 28800 # Node ID c7572e9cdf49a37b96375e799c7b9818ae36fd1d # Parent 9fd4142d9739977cc3b49e3373461373a57365ec Update VSMS to pass a namespace when parsing EO method arguments Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r 9fd4142d9739 -r c7572e9cdf49 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Mon Nov 12 12:16:21 2007 +0100 +++ b/src/Virt_VirtualSystemManagementService.c Mon Nov 12 11:07:46 2007 -0800 @@ -51,6 +51,7 @@ const static CMPIBroker *_BROKER; const static CMPIBroker *_BROKER; static int parse_str_inst_array(CMPIArray *array, + const char *ns, struct inst_list *list) { int count; @@ -67,8 +68,9 @@ static int parse_str_inst_array(CMPIArra /* FIXME: Check for string here */ ret = cu_parse_embedded_instance(CMGetCharPtr(item.value.string), - _BROKER, - &inst); + _BROKER, + ns, + &inst); if (ret == 0) inst_list_add(list, inst); @@ -79,6 +81,7 @@ static int parse_str_inst_array(CMPIArra static CMPIStatus define_system_parse_args(const CMPIArgs *argsin, CMPIInstance **sys, + const char *ns, struct inst_list *res) { CMPIStatus s = {CMPI_RC_ERR_FAILED, NULL}; @@ -92,7 +95,10 @@ static CMPIStatus define_system_parse_ar goto out; } - ret = cu_parse_embedded_instance(sys_str, _BROKER, sys); + ret = cu_parse_embedded_instance(sys_str, + _BROKER, + ns, + sys); if (ret) { CU_DEBUG("Unable to parse SystemSettings instance"); CMSetStatusWithChars(_BROKER, &s, @@ -107,7 +113,7 @@ static CMPIStatus define_system_parse_ar goto out; } - ret = parse_str_inst_array(res_arr, res); + ret = parse_str_inst_array(res_arr, ns, res); CMSetStatus(&s, CMPI_RC_OK); @@ -371,7 +377,7 @@ static CMPIStatus define_system(CMPIMeth CU_DEBUG("DefineSystem"); - s = define_system_parse_args(argsin, &vssd, &res); + s = define_system_parse_args(argsin, &vssd, NAMESPACE(reference), &res); if (s.rc != CMPI_RC_OK) goto out; @@ -527,7 +533,10 @@ static CMPIStatus mod_system_settings(CM return s; } - if (cu_parse_embedded_instance(inst_str, _BROKER, &inst)) { + if (cu_parse_embedded_instance(inst_str, + _BROKER, + NAMESPACE(reference), + &inst)) { CMPIStatus s; cu_statusf(_BROKER, &s, @@ -889,7 +898,7 @@ static CMPIStatus update_resource_settin goto out; } - parse_str_inst_array(array, &list); + parse_str_inst_array(array, NAMESPACE(ref), &list); s = _update_resource_settings(ref, &list, func);