projects
/
platform
/
upstream
/
dbus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'dbus-1.6'
[platform/upstream/dbus.git]
/
test
/
test-utils.c
diff --git
a/test/test-utils.c
b/test/test-utils.c
index
4fd84fe
..
c3c3ed3
100644
(file)
--- a/
test/test-utils.c
+++ b/
test/test-utils.c
@@
-26,6
+26,15
@@
remove_watch (DBusWatch *watch,
_dbus_loop_remove_watch (cd->loop, watch);
}
_dbus_loop_remove_watch (cd->loop, watch);
}
+static void
+toggle_watch (DBusWatch *watch,
+ void *data)
+{
+ CData *cd = data;
+
+ _dbus_loop_toggle_watch (cd->loop, watch);
+}
+
static dbus_bool_t
add_timeout (DBusTimeout *timeout,
void *data)
static dbus_bool_t
add_timeout (DBusTimeout *timeout,
void *data)
@@
-103,15
+112,10
@@
test_connection_setup (DBusLoop *loop,
if (cd == NULL)
goto nomem;
if (cd == NULL)
goto nomem;
- /* Because dbus-mainloop.c checks dbus_timeout_get_enabled(),
- * dbus_watch_get_enabled() directly, we don't have to provide
- * "toggled" callbacks.
- */
-
if (!dbus_connection_set_watch_functions (connection,
add_watch,
remove_watch,
if (!dbus_connection_set_watch_functions (connection,
add_watch,
remove_watch,
-
NULL
,
+
toggle_watch
,
cd, cdata_free))
goto nomem;
cd, cdata_free))
goto nomem;
@@
-213,6
+217,15
@@
add_server_watch (DBusWatch *watch,
}
static void
}
static void
+toggle_server_watch (DBusWatch *watch,
+ void *data)
+{
+ ServerData *context = data;
+
+ _dbus_loop_toggle_watch (context->loop, watch);
+}
+
+static void
remove_server_watch (DBusWatch *watch,
void *data)
{
remove_server_watch (DBusWatch *watch,
void *data)
{
@@
-252,7
+265,7
@@
test_server_setup (DBusLoop *loop,
if (!dbus_server_set_watch_functions (server,
add_server_watch,
remove_server_watch,
if (!dbus_server_set_watch_functions (server,
add_server_watch,
remove_server_watch,
-
NULL
,
+
toggle_server_watch
,
sd,
serverdata_free))
{
sd,
serverdata_free))
{