From 4b43f5db7a3570978b49cb3adca3ca4afc95f8aa Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 21 Jan 2011 18:54:33 +0000 Subject: DBusLoop: remove second layer of watch callbacks where possible Similar to the previous commit, almost every use of DBusWatch can just have the main loop call dbus_watch_handle. The one exception is the bus activation code; it's had a comment explaining why it's wrong since 2003. We should fix that one day, but for now, just migrate it to a new _dbus_loop_add_watch_full which preserves the second-layer callback. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33342 Reviewed-by: Thiago Macieira --- bus/activation.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bus/activation.c') diff --git a/bus/activation.c b/bus/activation.c index 31dbaf54..7ce463c3 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -1427,9 +1427,9 @@ add_babysitter_watch (DBusWatch *watch, { BusPendingActivation *pending_activation = data; - return _dbus_loop_add_watch (bus_context_get_loop (pending_activation->activation->context), - watch, babysitter_watch_callback, pending_activation, - NULL); + return _dbus_loop_add_watch_full ( + bus_context_get_loop (pending_activation->activation->context), + watch, babysitter_watch_callback, pending_activation, NULL); } static void @@ -1439,7 +1439,7 @@ remove_babysitter_watch (DBusWatch *watch, BusPendingActivation *pending_activation = data; _dbus_loop_remove_watch (bus_context_get_loop (pending_activation->activation->context), - watch, babysitter_watch_callback, pending_activation); + watch); } static dbus_bool_t -- cgit v1.2.1