summaryrefslogtreecommitdiffstats
path: root/bus
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-03-28 00:01:53 +0000
committerHavoc Pennington <hp@redhat.com>2003-03-28 00:01:53 +0000
commit574c258bc9304d51bf0cdd131a6473e6fc5b477f (patch)
tree730ae7a634a428282460186d1160f5b21b63db8e /bus
parent19670f221f0c59089b51d3aa5493b00086b92550 (diff)
2003-03-27 Havoc Pennington <hp@redhat.com>
* bus/config-loader-libxml.c (bus_config_load): add another error check
Diffstat (limited to 'bus')
-rw-r--r--bus/config-loader-libxml.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/bus/config-loader-libxml.c b/bus/config-loader-libxml.c
index 74cfd7dc..250fbd2f 100644
--- a/bus/config-loader-libxml.c
+++ b/bus/config-loader-libxml.c
@@ -78,6 +78,7 @@ bus_config_load (const DBusString *file,
const char *filename;
BusConfigParser *parser;
DBusError tmp_error;
+ int ret;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
@@ -122,7 +123,7 @@ bus_config_load (const DBusString *file,
xmlTextReaderSetErrorHandler (reader, xml_text_reader_error, &tmp_error);
- while (xmlTextReaderRead (reader) == 1)
+ while ((ret = xmlTextReaderRead (reader)) == 1)
{
int type;
@@ -142,6 +143,14 @@ bus_config_load (const DBusString *file,
* manually handle stuff like &lt;
*/
}
+
+ if (ret == -1)
+ {
+ if (!dbus_error_is_set (&tmp_error))
+ dbus_set_error (&tmp_error,
+ DBUS_ERROR_FAILED,
+ "Unknown failure loading configuration file");
+ }
reader_out:
xmlFreeTextReader (reader);