diff options
author | Havoc Pennington <hp@redhat.com> | 2003-04-03 05:22:49 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-04-03 05:22:49 +0000 |
commit | eeb88949d8d2ca84d9cbe54c07e73b9907d3163e (patch) | |
tree | 9520b0d32fd0c105f41619f8d247a298f93caf9c /bus/bus.c | |
parent | 5364beac6cbfa8793fd34c7a634528a2112787f8 (diff) |
2003-04-03 Havoc Pennington <hp@pobox.com>
* bus/config-parser.c (bus_config_parser_unref): free
list of mechanisms, bug discovered by test suite enhancements
(putting system.conf and session.conf into suite)
* test/Makefile.am, test/test-service.c: add placeholder for a
test service that we'll activate as part of test suite. Doesn't
do anything yet.
* dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
setting NULL value, and use system malloc not dbus_malloc()
when we have unavoidable memleakage.
* dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
didn't work, and support DBUS_BUS_ACTIVATION.
* bus/activation.c (child_setup): pass our well-known bus type to
the child
* bus/config-parser.c: support <type> to specify well-known type
* doc/dbus-specification.sgml: document the env variables to
locate well-known buses and find service activator
Diffstat (limited to 'bus/bus.c')
-rw-r--r-- | bus/bus.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -36,6 +36,7 @@ struct BusContext { int refcount; + char *type; char *address; DBusList *servers; BusConnections *connections; @@ -290,6 +291,9 @@ bus_context_new (const DBusString *config_file, if (!_dbus_change_identity (creds.uid, creds.gid, error)) goto failed; } + + /* note that type may be NULL */ + context->type = _dbus_strdup (bus_config_parser_get_type (parser)); /* We have to build the address backward, so that * <listen> later in the config file have priority @@ -496,12 +500,20 @@ bus_context_unref (BusContext *context) _dbus_hash_table_unref (context->rules_by_gid); context->rules_by_gid = NULL; } - + + dbus_free (context->type); dbus_free (context->address); dbus_free (context); } } +/* type may be NULL */ +const char* +bus_context_get_type (BusContext *context) +{ + return context->type; +} + BusRegistry* bus_context_get_registry (BusContext *context) { |