]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
* bus/dir-watch-default.c, bus/dir-watch-dnotify.c,
authorJohn (J5) Palmieri <johnp@redhat.com>
Thu, 19 Oct 2006 19:43:05 +0000 (19:43 +0000)
committerJohn (J5) Palmieri <johnp@redhat.com>
Thu, 19 Oct 2006 19:43:05 +0000 (19:43 +0000)
  bus/dir-watch-kqueue.c (bus_watch_directory): Pass in a BusContext
  instead of a void *.  kqueue uses this to get the context's loop
  while the other modules ignore the parameter.  This allows us to
  avoid platform conditionals

* bus/bus.c (process_config_postinit): Pass in the context to the
  watch

ChangeLog
bus/dir-watch-default.c
bus/dir-watch-dnotify.c
bus/dir-watch-kqueue.c
bus/dir-watch.h

index 6fd64702fabc425ed2d200e2ec8a5195b792ce53..822cb860d2c7bb85c2bb0acf59bd382c9f4cb3f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-10-19  John (J5) Palmieri  <johnp@redhat.com>
+
+       * bus/dir-watch-default.c, bus/dir-watch-dnotify.c, 
+       bus/dir-watch-kqueue.c (bus_watch_directory): Pass in a BusContext 
+       instead of a void *.  kqueue uses this to get the context's loop
+       while the other modules ignore the parameter.  This allows us to
+       avoid platform conditionals
+
+       * bus/bus.c (process_config_postinit): Pass in the context to the 
+       watch
+
 2006-10-19  John (J5) Palmieri  <johnp@redhat.com>
 
        * bus/messagebus.in, bus/rc.messagebus.in: run dbus-uuidgen --ensure
index 5dc159cab20ab741570956ae377ce0770b164c10..b73c61752d7e8d965688ed69824fb1664faa4707 100644 (file)
@@ -35,6 +35,6 @@ bus_drop_all_directory_watches (void)
 }
 
 void
-bus_watch_directory (const char *dir, void *userdata)
+bus_watch_directory (const char *dir, BusContext *context)
 {
 }
index 87e3276176c758e5c21bb1c543cb075811fa183d..988ef384ed3815584b059faffcd9b7f958092f0c 100644 (file)
@@ -38,7 +38,7 @@ static int fds[MAX_DIRS_TO_WATCH];
 static int num_fds = 0;
 
 void
-bus_watch_directory (const char *dir, void *userdata)
+bus_watch_directory (const char *dir, BusContext *context)
 {
   int fd;
 
index b08fd39f9dc38ba40806e2dbba8f416ef4ea098e..52f00102d437dac40e26f13d9c3f7802b1e7f4ee 100644 (file)
@@ -87,7 +87,7 @@ _handle_kqueue_watch (DBusWatch *watch, unsigned int flags, void *data)
 }
 
 void
-bus_watch_directory (const char *dir, void *userdata)
+bus_watch_directory (const char *dir, BusContext *context)
 {
   int fd;
   struct kevent ev;
@@ -104,7 +104,7 @@ bus_watch_directory (const char *dir, void *userdata)
          goto out;
        }
 
-        loop = userdata;
+        loop = bus_context_get_loop (context);
 
         watch = _dbus_watch_new (kq, DBUS_WATCH_READABLE, TRUE,
                                  _handle_kqueue_watch, NULL, NULL);
index 3b7542612e649f9075c595dcc7c06be2a98eb43d..263ee035eb70579a8f6c72639968314c0bc9db70 100644 (file)
  *
  */
 
+#include "bus.h"
+
 #ifndef DIR_WATCH_H
 #define DIR_WATCH_H
 
 /* setup a watch on a directory (OS dependent, may be a NOP) */
-void bus_watch_directory (const char *directory, void *userdata);
+void bus_watch_directory (const char *directory, BusContext *context);
 
 /* drop all the watches previously set up by bus_config_watch_directory (OS dependent, may be a NOP) */
 void bus_drop_all_directory_watches (void);