summaryrefslogtreecommitdiffstats
path: root/dbus
diff options
context:
space:
mode:
Diffstat (limited to 'dbus')
-rw-r--r--dbus/dbus-connection.c4
-rw-r--r--dbus/dbus-server-debug.c4
-rw-r--r--dbus/dbus-server.c2
-rw-r--r--dbus/dbus-transport-debug.c2
4 files changed, 8 insertions, 4 deletions
diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
index 19fe717d..d52341a7 100644
--- a/dbus/dbus-connection.c
+++ b/dbus/dbus-connection.c
@@ -334,6 +334,7 @@ _dbus_connection_remove_watch (DBusConnection *connection,
* available. Otherwise records the timeout to be added when said
* function is available. Also re-adds the timeout if the
* DBusAddTimeoutFunction changes. May fail due to lack of memory.
+ * The timeout will fire only one time.
*
* @param connection the connection.
* @param timeout the timeout to add.
@@ -1861,7 +1862,8 @@ dbus_connection_set_watch_functions (DBusConnection *connection,
* dbus_timeout_get_interval.
*
* Once a timeout occurs, dbus_timeout_handle should be called to invoke
- * the timeout's callback.
+ * the timeout's callback, and the timeout should be automatically
+ * removed. i.e. timeouts are one-shot.
*
* @param connection the connection.
* @param add_function function to add a timeout.
diff --git a/dbus/dbus-server-debug.c b/dbus/dbus-server-debug.c
index f558e82e..5f79e81c 100644
--- a/dbus/dbus-server-debug.c
+++ b/dbus/dbus-server-debug.c
@@ -43,7 +43,7 @@
/**
* Default timeout interval when reading or writing.
*/
-#define DEFAULT_INTERVAL 10
+#define DEFAULT_INTERVAL 1
/**
* Opaque object representing a debug server implementation.
@@ -249,6 +249,8 @@ _dbus_server_debug_accept_transport (DBusServer *server,
if (!_dbus_server_add_timeout (server, timeout))
goto failed;
+ _dbus_timeout_unref (timeout);
+
return TRUE;
failed:
diff --git a/dbus/dbus-server.c b/dbus/dbus-server.c
index 99a5a2af..cfcc0dd5 100644
--- a/dbus/dbus-server.c
+++ b/dbus/dbus-server.c
@@ -146,7 +146,7 @@ _dbus_server_remove_watch (DBusServer *server,
/**
* Adds a timeout for this server, chaining out to application-provided
- * timeout handlers.
+ * timeout handlers. The timeout will fire only one time.
*
* @param server the server.
* @param timeout the timeout to add.
diff --git a/dbus/dbus-transport-debug.c b/dbus/dbus-transport-debug.c
index e0a90644..cb4b3c2c 100644
--- a/dbus/dbus-transport-debug.c
+++ b/dbus/dbus-transport-debug.c
@@ -44,7 +44,7 @@
/**
* Default timeout interval when reading or writing.
*/
-#define DEFAULT_INTERVAL 10
+#define DEFAULT_INTERVAL 1
/**
* Opaque object representing a debug transport.