mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-06-19 09:38:27 +02:00
2003-03-27 Havoc Pennington <hp@redhat.com>
* bus/config-loader-libxml.c (bus_config_load): add another error check
This commit is contained in:
parent
19670f221f
commit
574c258bc9
2 changed files with 15 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
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 <
|
||||
*/
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue