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-changelog

[Xen-changelog] [xen-unstable] Allow the C bindings to be more permissiv

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Allow the C bindings to be more permissive when a structure is missing some
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Nov 2006 20:00:16 +0000
Delivery-date: Tue, 28 Nov 2006 11:59:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID fe15bf5a58ad52b3e09db058ca9f66b21c9f4b29
# Parent  514ed4f0e5da6eb0b0bd8727194296434c4b5005
Allow the C bindings to be more permissive when a structure is missing some
entries.  Complaining is just slowing development down when the server and
clients get out of sync.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/libxen/src/xen_common.c |   10 ++++++++++
 1 files changed, 10 insertions(+)

diff -r 514ed4f0e5da -r fe15bf5a58ad tools/libxen/src/xen_common.c
--- a/tools/libxen/src/xen_common.c     Tue Nov 28 15:47:52 2006 +0000
+++ b/tools/libxen/src/xen_common.c     Tue Nov 28 16:22:22 2006 +0000
@@ -35,6 +35,14 @@
 #include "xen_string_string_map.h"
 
 
+/*
+ * Whether to ignore missing structure entries.  This is not something we
+ * want to do, once the API has stabilised, as it indicates that the server is
+ * broken, but at the moment, complaining is just slowing development down.
+ */
+#define PERMISSIVE 1
+
+
 static xmlXPathCompExprPtr responsePath = NULL;
 static xmlXPathCompExprPtr faultPath = NULL;
 
@@ -756,6 +764,7 @@ static void parse_into(xen_session *s, x
                 cur = cur->next;
             }
 
+#if !PERMISSIVE
             /* Check that we've filled all fields. */
             for (size_t i = 0; i < member_count; i++)
             {
@@ -780,6 +789,7 @@ static void parse_into(xen_session *s, x
                     return;
                 }
             }
+#endif
 
             free(checklist);
             ((void **)value)[slot] = result;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Allow the C bindings to be more permissive when a structure is missing some, Xen patchbot-unstable <=