[Libvirt-cim] [PATCH] UUID and Timestamp were incorrectly set for indications

Sharad Mishra snmishra at us.ibm.com
Tue Jan 11 19:30:46 UTC 2011


# HG changeset patch
# User Sharad Mishra <snmishra at us.ibm.com>
# Date 1294774143 28800
# Node ID 16a78de40b7fd62ee6d83e1491b52a4cf86a3839
# Parent  28f3d6f46a06aa5be6aba8bcfeda55bd0ddc5468
UUID and Timestamp were incorrectly set for indications.

CMSetProperty call was failing to set uuid and timestamp
since they were not properly passed.

signed-off-by: Sharad Mishra <snmishra at us.ibm.com>

diff -r 28f3d6f46a06 -r 16a78de40b7f src/Virt_ComputerSystemIndication.c
--- a/src/Virt_ComputerSystemIndication.c	Mon Dec 27 16:32:02 2010 -0800
+++ b/src/Virt_ComputerSystemIndication.c	Tue Jan 11 11:29:03 2011 -0800
@@ -282,11 +282,11 @@
 
         uuid = CMGetProperty(affected_inst, "UUID", &s);
         CMSetProperty(ind, "IndicationIdentifier", 
-                (CMPIValue *)&uuid, CMPI_string);
+                (CMPIValue *)&(uuid.value), CMPI_string);
 
         timestamp =  CMNewDateTime(broker, &s);
         CMSetProperty(ind, "IndicationTime", 
-                (CMPIValue *)timestamp, CMPI_dateTime);
+                (CMPIValue *)&timestamp, CMPI_dateTime);
 
         if (ind_type == CS_MODIFIED) {
                 CMSetProperty(ind, "PreviousInstance",
diff -r 28f3d6f46a06 -r 16a78de40b7f src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c	Mon Dec 27 16:32:02 2010 -0800
+++ b/src/Virt_VSMigrationService.c	Tue Jan 11 11:29:03 2011 -0800
@@ -755,6 +755,7 @@
                 return false;
 
         ind_name = ind_type_to_name(ind_type);
+        CU_DEBUG("Raising %s indication", ind_name);
 
         ref = CMGetObjectPath(inst, &s);
 
@@ -847,7 +848,7 @@
 
         timestamp = CMNewDateTime(broker, s);
         CMSetProperty(ind, "IndicationTime",
-                (CMPIValue *)timestamp, CMPI_dateTime);
+                (CMPIValue *)&timestamp, CMPI_dateTime);
 
         if (ind_type == MIG_MODIFIED) {
                 /* Need to copy job inst before attaching as PreviousInstance 




More information about the Libvirt-cim mailing list