[Libvirt-cim] [PATCH 10 of 18] Fixes to RegisteredProfile for libcmpiutil API change

Dan Smith danms at us.ibm.com
Tue Nov 27 19:28:36 UTC 2007


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1196195095 28800
# Node ID fd942395e4dc888d1eede22d2dae5b99d9eed4eb
# Parent  7e2a9350d9794c4744ecab188da956434f28ce6c
Fixes to RegisteredProfile for libcmpiutil API change

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

diff -r 7e2a9350d979 -r fd942395e4dc src/Virt_RegisteredProfile.c
--- a/src/Virt_RegisteredProfile.c	Tue Nov 27 12:24:49 2007 -0800
+++ b/src/Virt_RegisteredProfile.c	Tue Nov 27 12:24:55 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