ia64/xen-unstable

changeset 12635:fe15bf5a58ad

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@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Tue Nov 28 16:22:22 2006 +0000 (2006-11-28)
parents 514ed4f0e5da
children 221b8ea81823
files tools/libxen/src/xen_common.c
line diff
     1.1 --- a/tools/libxen/src/xen_common.c	Tue Nov 28 15:47:52 2006 +0000
     1.2 +++ b/tools/libxen/src/xen_common.c	Tue Nov 28 16:22:22 2006 +0000
     1.3 @@ -35,6 +35,14 @@
     1.4  #include "xen_string_string_map.h"
     1.5  
     1.6  
     1.7 +/*
     1.8 + * Whether to ignore missing structure entries.  This is not something we
     1.9 + * want to do, once the API has stabilised, as it indicates that the server is
    1.10 + * broken, but at the moment, complaining is just slowing development down.
    1.11 + */
    1.12 +#define PERMISSIVE 1
    1.13 +
    1.14 +
    1.15  static xmlXPathCompExprPtr responsePath = NULL;
    1.16  static xmlXPathCompExprPtr faultPath = NULL;
    1.17  
    1.18 @@ -756,6 +764,7 @@ static void parse_into(xen_session *s, x
    1.19                  cur = cur->next;
    1.20              }
    1.21  
    1.22 +#if !PERMISSIVE
    1.23              /* Check that we've filled all fields. */
    1.24              for (size_t i = 0; i < member_count; i++)
    1.25              {
    1.26 @@ -780,6 +789,7 @@ static void parse_into(xen_session *s, x
    1.27                      return;
    1.28                  }
    1.29              }
    1.30 +#endif
    1.31  
    1.32              free(checklist);
    1.33              ((void **)value)[slot] = result;