dbus/bus dir-watch-default.c, 1.1, 1.2 dir-watch-dnotify.c, 1.2,
1.3 dir-watch.h, 1.1, 1.2 dir-watch-kqueue.c, 1.1, 1.2
John Palmieri
johnp at kemper.freedesktop.org
Thu Oct 19 12:43:09 PDT 2006
Update of /cvs/dbus/dbus/bus
In directory kemper:/tmp/cvs-serv29401/bus
Modified Files:
dir-watch-default.c dir-watch-dnotify.c dir-watch.h
dir-watch-kqueue.c
Log Message:
* 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
Index: dir-watch-default.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/dir-watch-default.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- dir-watch-default.c 8 Aug 2006 22:08:39 -0000 1.1
+++ dir-watch-default.c 19 Oct 2006 19:43:05 -0000 1.2
@@ -35,6 +35,6 @@
}
void
-bus_watch_directory (const char *dir, void *userdata)
+bus_watch_directory (const char *dir, BusContext *context)
{
}
Index: dir-watch-dnotify.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/dir-watch-dnotify.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dir-watch-dnotify.c 10 Aug 2006 21:00:30 -0000 1.2
+++ dir-watch-dnotify.c 19 Oct 2006 19:43:05 -0000 1.3
@@ -38,7 +38,7 @@
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: dir-watch.h
===================================================================
RCS file: /cvs/dbus/dbus/bus/dir-watch.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- dir-watch.h 15 Jun 2005 02:31:38 -0000 1.1
+++ dir-watch.h 19 Oct 2006 19:43:05 -0000 1.2
@@ -21,11 +21,13 @@
*
*/
+#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);
Index: dir-watch-kqueue.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/dir-watch-kqueue.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- dir-watch-kqueue.c 8 Aug 2006 22:08:39 -0000 1.1
+++ dir-watch-kqueue.c 19 Oct 2006 19:43:05 -0000 1.2
@@ -87,7 +87,7 @@
}
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 @@
goto out;
}
- loop = userdata;
+ loop = bus_context_get_loop (context);
watch = _dbus_watch_new (kq, DBUS_WATCH_READABLE, TRUE,
_handle_kqueue_watch, NULL, NULL);
More information about the dbus-commit
mailing list