[patch] automatically reload config
Colin Walters
walters at verbum.org
Tue Jun 14 19:11:34 PDT 2005
On Tue, 2005-06-14 at 21:13 -0400, David Zeuthen wrote:
> On Tue, 2005-06-14 at 18:03 -0400, Colin Walters wrote:
> > About the patch; I'm a bit confused why bus_config_load and takes a
> > watch_config_directories argument. Why not just default it to TRUE
> > inside bus_config_parser_new?
>
> Yeah, the thinking was to not use this for tests.
Ah; perhaps you could disable the watching inside the test conf files.
It shouldn't be a big deal though; I don't think anything changes the
test/data/valid-conf-files dir during build.
> > It also seems a bit evil to start watching the directory in the config
> > parser itself; should probably maintain a list of directories and then
> > process_config_every_time does both the drop of watched dirs and the
> > invocation of bus_config_watch_directory, retrieving the list via a new
> > function, bus_config_parser_get_watched_dirs.
>
> That sounds much smarter. The attached patch should do this.
Is there a reason you don't do the bus_watch_directory inside
process_config_every_time? That function is called by both
bus_context_new and bus_context_reload_config, and is intended to
contain everything that should run during context construction and
configuration reload.
Other than that minor bit, it looks good to me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050614/00afd351/attachment.pgp
More information about the dbus
mailing list