WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] [xend and libxenapi] Fix VM.get_power_state API

To: Jim Fehlig <jfehlig@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] [xend and libxenapi] Fix VM.get_power_state API
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Fri, 15 Dec 2006 10:58:43 +0000
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 15 Dec 2006 02:58:42 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4580A4CF.4010607@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4580A4CF.4010607@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Wed, Dec 13, 2006 at 06:11:43PM -0700, Jim Fehlig wrote:

> Xend was returning an integer representation of the power state instead 
> of a string representation as specified by the XenAPI spec.
> 
> On the c-bindings side, the marshaling code converts the string 
> representation to an enum value.  A subsequent attempt to convert the 
> enum from a string to an enum in xen_vm_get_power_state() was causing a 
> seg fault in client application.
> 
> This patch fixes the code paths in both xend and c-bindings.
> 
> Regards,
> Jim

> # HG changeset patch
> # User jfehlig@xxxxxxxxxxxxxxxxxxxxxxxxx
> # Date 1166058408 25200
> # Node ID 42b515caeb78bc9921b1526a9a781724f232aff0
> # Parent  360eb996fa38319867a74bf581c734a80bf6839d
> Fix VM.get_power_state API.  On the xend side an integer representation of 
> the power state was being returned instead of a string representation as 
> specified by the XenAPI spec.
> 
> On the c-bindings side the marshalling code converts the string 
> representation to an enum value.  A subsequent attempt to convert the enum 
> from a string to an enum was causing a seg fault.
> 
> Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxxxx>

Applied, thanks Jim.  I've added a test for that to the test_bindings program
too.

Ewan.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>