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

Chip Vincent cvincent at linux.vnet.ibm.com
Thu Jan 13 19:30:32 UTC 2011


Arg!!! I was in the middle of testing when I got side-tracked and saw 
the same thing. Thanks for fixing!

+1

Pushed.

Sharad Mishra wrote:
> # 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 
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
>   


-- 
Chip Vincent
Open Virtualization, Linux Technology Center
IBM Systems & Technology Group
phone: 919-254-4482, T/L 444-4482
email: cvincent at us.ibm.com




More information about the Libvirt-cim mailing list