summaryrefslogtreecommitdiff
path: root/bus
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-02-07 15:03:56 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-02-07 15:04:25 +0000
commit88498b706a39bbe520f9591d8d52b54fb1f8e378 (patch)
tree5243eb3c97b8039d0ff43cd7121a632bbdb9d3bc /bus
parentb816cb6e900073c6a6126687f2102dfd8e594e68 (diff)
parent3f4ed9def33c359142c340f28345755ca37663f2 (diff)
downloaddbus-88498b706a39bbe520f9591d8d52b54fb1f8e378.tar.gz
Merge branch 'socket-set-33337'
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
Diffstat (limited to 'bus')
-rw-r--r--bus/activation.c12
-rw-r--r--bus/bus.c14
-rw-r--r--bus/connection.c11
-rw-r--r--bus/test.c9
4 files changed, 42 insertions, 4 deletions
diff --git a/bus/activation.c b/bus/activation.c
index 2744e214..3dfba787 100644
--- a/bus/activation.c
+++ b/bus/activation.c
@@ -1427,6 +1427,16 @@ remove_babysitter_watch (DBusWatch *watch,
watch);
}
+static void
+toggle_babysitter_watch (DBusWatch *watch,
+ void *data)
+{
+ BusPendingActivation *pending_activation = data;
+
+ _dbus_loop_toggle_watch (bus_context_get_loop (pending_activation->activation->context),
+ watch);
+}
+
static dbus_bool_t
pending_activation_timed_out (void *data)
{
@@ -2110,7 +2120,7 @@ bus_activation_activate_service (BusActivation *activation,
if (!_dbus_babysitter_set_watch_functions (pending_activation->babysitter,
add_babysitter_watch,
remove_babysitter_watch,
- NULL,
+ toggle_babysitter_watch,
pending_activation,
NULL))
{
diff --git a/bus/bus.c b/bus/bus.c
index 358a9106..c7308b79 100644
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -126,6 +126,18 @@ remove_server_watch (DBusWatch *watch,
_dbus_loop_remove_watch (context->loop, watch);
}
+static void
+toggle_server_watch (DBusWatch *watch,
+ void *data)
+{
+ DBusServer *server = data;
+ BusContext *context;
+
+ context = server_get_context (server);
+
+ _dbus_loop_toggle_watch (context->loop, watch);
+}
+
static dbus_bool_t
add_server_timeout (DBusTimeout *timeout,
void *data)
@@ -228,7 +240,7 @@ setup_server (BusContext *context,
if (!dbus_server_set_watch_functions (server,
add_server_watch,
remove_server_watch,
- NULL,
+ toggle_server_watch,
server,
NULL))
{
diff --git a/bus/connection.c b/bus/connection.c
index 26839529..97e5f64b 100644
--- a/bus/connection.c
+++ b/bus/connection.c
@@ -327,6 +327,15 @@ remove_connection_watch (DBusWatch *watch,
_dbus_loop_remove_watch (connection_get_loop (connection), watch);
}
+static void
+toggle_connection_watch (DBusWatch *watch,
+ void *data)
+{
+ DBusConnection *connection = data;
+
+ _dbus_loop_toggle_watch (connection_get_loop (connection), watch);
+}
+
static dbus_bool_t
add_connection_timeout (DBusTimeout *timeout,
void *data)
@@ -631,7 +640,7 @@ bus_connections_setup_connection (BusConnections *connections,
if (!dbus_connection_set_watch_functions (connection,
add_connection_watch,
remove_connection_watch,
- NULL,
+ toggle_connection_watch,
connection,
NULL))
goto out;
diff --git a/bus/test.c b/bus/test.c
index e1b8a130..9a0c1967 100644
--- a/bus/test.c
+++ b/bus/test.c
@@ -50,6 +50,13 @@ remove_client_watch (DBusWatch *watch,
_dbus_loop_remove_watch (client_loop, watch);
}
+static void
+toggle_client_watch (DBusWatch *watch,
+ void *data)
+{
+ _dbus_loop_toggle_watch (client_loop, watch);
+}
+
static dbus_bool_t
add_client_timeout (DBusTimeout *timeout,
void *data)
@@ -112,7 +119,7 @@ bus_setup_debug_client (DBusConnection *connection)
if (!dbus_connection_set_watch_functions (connection,
add_client_watch,
remove_client_watch,
- NULL,
+ toggle_client_watch,
connection,
NULL))
goto out;