From: Ewan Mellor Subject: Re: [PATCH] [xend and libxenapi] Fix VM.get_power_state API Date: Fri, 15 Dec 2006 10:58:43 +0000 Message-ID: <20061215105843.GA4499@leeni.uk.xensource.com> References: <4580A4CF.4010607@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4580A4CF.4010607@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jim Fehlig Cc: Xen-devel List-Id: xen-devel@lists.xenproject.org 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@jfehlig2.provo.novell.com > # 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 Applied, thanks Jim. I've added a test for that to the test_bindings program too. Ewan.