[gnome-keyring] Use default D-Bus timeout when finding daemon.



commit 0eb9a70dfad3ef49cd1688582c9545082181e830
Author: Jonny Lamb <jonnylamb gnome org>
Date:   Thu Oct 1 19:12:29 2009 +0100

    Use default D-Bus timeout when finding daemon.
    
    When we're trying to find the keyring daemon over D-Bus it's likely
    that we're service activating it. If we've got a timeout of one
    second and the system is under heavy load (booting, for example), then
    it will not start in time, and gnome_keyring_is_available() will
    return FALSE.
    
    The default timeout in dbus-daemon is 25 seconds at the time of
    writing. Although this sounds a lot for a blocking call in
    _is_available, the only situation where it could take this amount of
    time is if the keyring daemon is on the bus but is not responding
    (it's wedged itself somehow). In all other circumstances, a response
    should come immediately.
    
    Signed-off-by: Jonny Lamb <jonnylamb gnome org>
    Signed-off-by: Stef Walter <stef memberwebs com>

 library/gnome-keyring-socket.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/library/gnome-keyring-socket.c b/library/gnome-keyring-socket.c
index 0287111..053f5ac 100644
--- a/library/gnome-keyring-socket.c
+++ b/library/gnome-keyring-socket.c
@@ -72,7 +72,7 @@ find_daemon_via_dbus ()
 	}
 
 	/* Send message and get a handle for a reply */
-	reply = dbus_connection_send_with_reply_and_block (dconn, msg, 1000, &derr);
+	reply = dbus_connection_send_with_reply_and_block (dconn, msg, -1, &derr);
 	dbus_message_unref (msg);
 	if (!reply) {
 		g_warning ("couldn't communicate with gnome keyring daemon via dbus: %s", derr.message);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]