[gnome-system-tools] Bug 578037 – Shouldn't use default D-Bus timeout in calls to Policykit agent



commit 341d01941791e5dfae0a13f3bb727f930deb7dd3
Author: Chris Coulson <chrisccoulson googlemail com>
Date:   Sun Jul 26 12:11:35 2009 +0200

    Bug 578037 â?? Shouldn't use default D-Bus timeout in calls to Policykit agent
    
    Using the default timeout results in an error being shown after a few seconds when the user has not entered his password quickly enough. Since we don't expect a reply before any user action, we should pass INT_MAX as delay. See http://dbus.freedesktop.org/doc/api/html/group__DBusConnection.html#ga951b2a6f6c4069fa392752000b24ebe.

 src/common/gst-polkit-action.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/common/gst-polkit-action.c b/src/common/gst-polkit-action.c
index 0f25aec..19bad76 100644
--- a/src/common/gst-polkit-action.c
+++ b/src/common/gst-polkit-action.c
@@ -405,7 +405,7 @@ gst_polkit_action_authenticate (GstPolKitAction *action)
 	dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &priv->action);
 	dbus_message_iter_append_basic (&iter, DBUS_TYPE_UINT32, &xid);
 
-	dbus_connection_send_with_reply (priv->session_bus, message, &pending_call, -1);
+	dbus_connection_send_with_reply (priv->session_bus, message, &pending_call, INT_MAX);
 
 	if (pending_call) {
 		dbus_pending_call_set_notify (pending_call, async_reply_cb,



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