# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1203681290 -3600
# Node ID acb930f1a7c5886d906e30b524d09d4844bbffa3
# Parent d67ec3ae8446a3c9e68b36e511f63ef292689a8c
VSMS: adopt interface changes of RASD
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r d67ec3ae8446 -r acb930f1a7c5 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Fri Feb 22 12:54:47 2008 +0100
+++ b/src/Virt_VirtualSystemManagementService.c Fri Feb 22 12:54:50 2008 +0100
@@ -1000,7 +1000,7 @@ static CMPIStatus rasd_refs_to_insts(con
CMPIArray *arr,
CMPIArray **ret_arr)
{
- CMPIStatus s;
+ CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIArray *tmp_arr;
int i;
int c;
@@ -1017,7 +1017,7 @@ static CMPIStatus rasd_refs_to_insts(con
for (i = 0; i < c; i++) {
CMPIData d;
CMPIObjectPath *ref;
- CMPIInstance *inst;
+ CMPIInstance *inst = NULL;
const char *id;
uint16_t type;
@@ -1041,21 +1041,18 @@ static CMPIStatus rasd_refs_to_insts(con
continue;
}
- inst = get_rasd_instance(ctx, reference, _BROKER, id, type);
- if (inst != NULL)
- CMSetArrayElementAt(tmp_arr, i,
- &inst,
- CMPI_instance);
- else
- CU_DEBUG("Failed to get instance for `%s'",
- REF2STR(ref));
- }
-
- cu_statusf(_BROKER, &s,
- CMPI_RC_OK,
- "");
+ s = get_rasd_by_name(_BROKER, reference, id, type, &inst);
+ if (s.rc != CMPI_RC_OK)
+ continue;
+
+ CMSetArrayElementAt(tmp_arr, i,
+ &inst,
+ CMPI_instance);
+
+ }
+
*ret_arr = tmp_arr;
-
+
return s;
}