projects
/
platform
/
upstream
/
dbus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Optional autogen.sh flag --enable-kdbus-transport added allowing to compile...
[platform/upstream/dbus.git]
/
bus
/
config-loader-expat.c
diff --git
a/bus/config-loader-expat.c
b/bus/config-loader-expat.c
index
372a886
..
b571fda
100644
(file)
--- a/
bus/config-loader-expat.c
+++ b/
bus/config-loader-expat.c
@@
-1,9
+1,9
@@
-/* -*- mode: C; c-file-style: "gnu" -*- */
+/* -*- mode: C; c-file-style: "gnu"
; indent-tabs-mode: nil;
-*- */
/* config-loader-expat.c expat XML loader
*
* Copyright (C) 2003 Red Hat, Inc.
*
/* config-loader-expat.c expat XML loader
*
* Copyright (C) 2003 Red Hat, Inc.
*
- * Licensed under the Academic Free License version
1.2
+ * Licensed under the Academic Free License version
2.1
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-17,20
+17,16
@@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 5
9 Temple Place, Suite 330, Boston, MA 02111-1307
USA
+ * Foundation, Inc., 5
1 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
*
*/
*
*/
+#include <config.h>
#include "config-parser.h"
#include <dbus/dbus-internals.h>
#include <expat.h>
#include "config-parser.h"
#include <dbus/dbus-internals.h>
#include <expat.h>
-static XML_Memory_Handling_Suite memsuite =
-{
- dbus_malloc,
- dbus_realloc,
- dbus_free
-};
+static XML_Memory_Handling_Suite memsuite;
typedef struct
{
typedef struct
{
@@
-163,8
+159,10
@@
expat_CharacterDataHandler (void *userData,
BusConfigParser*
BusConfigParser*
-bus_config_load (const DBusString *file,
- DBusError *error)
+bus_config_load (const DBusString *file,
+ dbus_bool_t is_toplevel,
+ const BusConfigParser *parent,
+ DBusError *error)
{
XML_Parser expat;
const char *filename;
{
XML_Parser expat;
const char *filename;
@@
-193,7
+191,11
@@
bus_config_load (const DBusString *file,
_dbus_string_free (&context.content);
return NULL;
}
_dbus_string_free (&context.content);
return NULL;
}
-
+
+ memsuite.malloc_fcn = dbus_malloc;
+ memsuite.realloc_fcn = dbus_realloc;
+ memsuite.free_fcn = dbus_free;
+
expat = XML_ParserCreate_MM ("UTF-8", &memsuite, NULL);
if (expat == NULL)
{
expat = XML_ParserCreate_MM ("UTF-8", &memsuite, NULL);
if (expat == NULL)
{
@@
-207,7
+209,7
@@
bus_config_load (const DBusString *file,
goto failed;
}
goto failed;
}
- parser = bus_config_parser_new (&dirname);
+ parser = bus_config_parser_new (&dirname
, is_toplevel, parent
);
if (parser == NULL)
{
dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
if (parser == NULL)
{
dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);