Commit 574c258b authored by Havoc Pennington's avatar Havoc Pennington

2003-03-27 Havoc Pennington <hp@redhat.com>

	* bus/config-loader-libxml.c (bus_config_load): add another error
	check
parent 19670f22
2003-03-27 Havoc Pennington <hp@redhat.com>
* bus/config-loader-libxml.c (bus_config_load): add another error
check
2003-03-26 Anders Carlsson <andersca@codefactory.se>
* doc/TODO:
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment