From 99af79d6c836e1b6b2d22075bcd04f6c8662cb83 Mon Sep 17 00:00:00 2001 From: Daniel Williams Date: Wed, 19 Mar 2008 16:08:49 +0000 Subject: [PATCH] - Ignore children of namespaced nodes too --- ...-0.73-ignore-namespaces-and-children.patch | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) rename dbus-glib-0.73-ignore-namespaces.patch => dbus-glib-0.73-ignore-namespaces-and-children.patch (62%) diff --git a/dbus-glib-0.73-ignore-namespaces.patch b/dbus-glib-0.73-ignore-namespaces-and-children.patch similarity index 62% rename from dbus-glib-0.73-ignore-namespaces.patch rename to dbus-glib-0.73-ignore-namespaces-and-children.patch index 0857fcf..dbd4e38 100644 --- a/dbus-glib-0.73-ignore-namespaces.patch +++ b/dbus-glib-0.73-ignore-namespaces-and-children.patch @@ -1,8 +1,7 @@ -diff --git a/dbus/dbus-gparser.c b/dbus/dbus-gparser.c -index f296f96..cdd4e53 100644 ---- a/dbus/dbus-gparser.c -+++ b/dbus/dbus-gparser.c -@@ -128,13 +128,17 @@ locate_attributes (const char *element_name, +diff -up dbus-glib-0.73/dbus/dbus-gparser.c.ignore-namespaces dbus-glib-0.73/dbus/dbus-gparser.c +--- dbus-glib-0.73/dbus/dbus-gparser.c.ignore-namespaces 2006-09-27 08:27:24.000000000 -0400 ++++ dbus-glib-0.73/dbus/dbus-gparser.c 2008-03-13 08:54:14.000000000 -0400 +@@ -128,13 +128,17 @@ locate_attributes (const char *element_ if (!found) { @@ -35,7 +34,7 @@ index f296f96..cdd4e53 100644 }; Parser* -@@ -791,10 +796,14 @@ parser_start_element (Parser *parser, +@@ -791,10 +796,14 @@ parser_start_element (Parser *parse } else { @@ -46,7 +45,7 @@ index f296f96..cdd4e53 100644 + if (strchr (element_name, ':') != NULL) + /* Passthrough XML-namespaced nodes */ + parser->unknown_namespaced_depth += 1; -+ else ++ else if (parser->unknown_namespaced_depth == 0) + g_set_error (error, G_MARKUP_ERROR, + G_MARKUP_ERROR_PARSE, + _("Element <%s> not recognized"), @@ -54,7 +53,7 @@ index f296f96..cdd4e53 100644 } return TRUE; -@@ -844,6 +853,11 @@ parser_end_element (Parser *parser, +@@ -844,6 +853,15 @@ parser_end_element (Parser *parser, if (parser->node_stack == NULL) parser->result = top; /* We are done, store the result */ } @@ -62,8 +61,23 @@ index f296f96..cdd4e53 100644 + { + /* Passthrough XML-namespaced nodes */ + parser->unknown_namespaced_depth -= 1; ++ } ++ else if (parser->unknown_namespaced_depth > 0) ++ { ++ /* pass through unknown elements underneath a namespace */ + } else g_assert_not_reached (); /* should have had an error on start_element */ - +diff -up dbus-glib-0.73/dbus/dbus-glib-tool.c.ignore-namespaces dbus-glib-0.73/dbus/dbus-glib-tool.c +--- dbus-glib-0.73/dbus/dbus-glib-tool.c.ignore-namespaces 2008-03-13 08:31:21.000000000 -0400 ++++ dbus-glib-0.73/dbus/dbus-glib-tool.c 2008-03-13 08:32:15.000000000 -0400 +@@ -414,7 +414,7 @@ main (int argc, char **argv) + &error); + if (node == NULL) + { +- lose_gerror (_("Unable to load \"%s\""), error); ++ lose (_("Unable to load \"%s\": %s"), filename, error->message); + } + else + {