[Libvirt-cim] [PATCH 09 of 17] Fixes to RegisteredProfile for libcmpiutil API change

Dan Smith danms at us.ibm.com
Wed Nov 28 17:10:22 UTC 2007


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1196272229 28800
# Node ID d144424ac5e89ea217f1a6dda6842c4b9643fb74
# Parent  fde363d69d8db4a85a2fdc52cad40ccc5ccc4236
Fixes to RegisteredProfile for libcmpiutil API change

Signed-off-by: Dan Smith <danms at us.ibm.com>

diff -r fde363d69d8d -r d144424ac5e8 src/Virt_RegisteredProfile.c
--- a/src/Virt_RegisteredProfile.c	Wed Nov 28 09:50:29 2007 -0800
+++ b/src/Virt_RegisteredProfile.c	Wed Nov 28 09:50:29 2007 -0800
@@ -124,11 +124,10 @@ static CMPIStatus get_prof(const CMPIObj
 {       
         CMPIStatus s = {CMPI_RC_OK, NULL};
         CMPIInstance *instance = NULL;
-        char* id;
+        const char* id;
         int i;
 
-        id = cu_get_str_path(ref, "InstanceID");
-        if (id == NULL) {
+        if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) {
                 CMSetStatusWithChars(_BROKER, &s,
                                      CMPI_RC_ERR_FAILED,
                                      "No InstanceID specified");
@@ -149,9 +148,6 @@ static CMPIStatus get_prof(const CMPIObj
                 CMReturnInstance(results, instance);
         else
                 CMSetStatus(&s, CMPI_RC_ERR_NOT_FOUND);
-                
-
-        free(id);
 
         return s;
 }




More information about the Libvirt-cim mailing list