Added permissiveness for floats.
authorEwan Mellor <ewan@xensource.com>
Fri, 5 Jan 2007 12:29:26 +0000 (12:29 +0000)
committerEwan Mellor <ewan@xensource.com>
Fri, 5 Jan 2007 12:29:26 +0000 (12:29 +0000)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/libxen/src/xen_common.c

index ea0909d1a4f9650017538b6d4a30a9e17e5995d5..c380b851908f7c2aa40442b07aac8a8fc659dba3 100644 (file)
@@ -557,8 +557,14 @@ static void parse_into(xen_session *s, xmlNode *value_node,
         xmlChar *string = string_from_value(value_node, "double");
         if (string == NULL)
         {
+#if PERMISSIVE
+            fprintf(stderr,
+                    "Expected a Float from the server, but didn't get one\n");
+            ((double *)value)[slot] = 0.0;
+#else
             server_error(
                 s, "Expected a Float from the server, but didn't get one");
+#endif
         }
         else
         {