diff options
author | Colin Walters <walters@verbum.org> | 2010-02-01 17:27:26 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-02-01 17:27:26 -0500 |
commit | 6db588b8544e117241a3be2c595dfc8fdcdc8f59 (patch) | |
tree | 7fc15cf9939edecf76d9cfd4163560bc9bc22363 /bus/bus.c | |
parent | 2016b83dece7f220269033e7957fb02140334294 (diff) | |
parent | e59db9df47bcf99aa292e6d13ca2044105a94b90 (diff) | |
download | dbus-6db588b8544e117241a3be2c595dfc8fdcdc8f59.tar.gz |
Merge branch 'my-dbus-1.2'
Diffstat (limited to 'bus/bus.c')
-rw-r--r-- | bus/bus.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -527,11 +527,6 @@ process_config_every_time (BusContext *context, goto failed; } - /* Drop existing conf-dir watches (if applicable) */ - - if (is_reload) - bus_drop_all_directory_watches (); - _DBUS_ASSERT_ERROR_IS_CLEAR (error); retval = TRUE; @@ -562,13 +557,17 @@ process_config_postinit (BusContext *context, _dbus_hash_table_unref (service_context_table); /* Watch all conf directories */ - _dbus_list_foreach (bus_config_parser_get_conf_dirs (parser), - (DBusForeachFunction) bus_watch_directory, - context); + bus_set_watched_dirs (context, bus_config_parser_get_conf_dirs (parser)); return TRUE; } +static void +bus_shutdown_all_directory_watches (void *data) +{ + bus_set_watched_dirs ((BusContext *) data, NULL); +} + BusContext* bus_context_new (const DBusString *config_file, ForceForkSetting force_fork, @@ -599,7 +598,9 @@ bus_context_new (const DBusString *config_file, context->refcount = 1; _dbus_generate_uuid (&context->uuid); - + + _dbus_register_shutdown_func (bus_shutdown_all_directory_watches, context); + if (!_dbus_string_copy_data (config_file, &context->config_file)) { BUS_SET_OOM (error); |