# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1203934430 -3600
# Node ID fdda40f15fcfd38c50a8918ad1075714e19efa7a
# Parent 6e25b6b5b541ee6a3547ab2125937a7207bd21fc
VSMS: adopt interface changes of RASD
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r 6e25b6b5b541 -r fdda40f15fcf src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Mon Feb 25 11:13:12 2008 +0100
+++ b/src/Virt_VirtualSystemManagementService.c Mon Feb 25 11:13: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;
}