agent: Use input request and browser launch timeouts
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Tue, 29 May 2012 13:19:29 +0000 (16:19 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Wed, 30 May 2012 09:29:14 +0000 (12:29 +0300)
src/agent.c

index 82dc46d..581f977 100644 (file)
@@ -31,8 +31,6 @@
 
 #include "connman.h"
 
-#define REQUEST_TIMEOUT (120 * 1000)           /* 120 seconds */
-
 static DBusConnection *connection = NULL;
 static guint agent_watch = 0;
 static gchar *agent_path = NULL;
@@ -459,7 +457,8 @@ int __connman_agent_request_passphrase_input(struct connman_service *service,
        }
 
        if (dbus_connection_send_with_reply(connection, message, &call,
-                                               REQUEST_TIMEOUT) == FALSE) {
+                                       connman_timeout_input_request())
+                       == FALSE) {
                dbus_message_unref(message);
                g_free(passphrase_reply);
                return -ESRCH;
@@ -525,7 +524,8 @@ int __connman_agent_request_login_input(struct connman_service *service,
        }
 
        if (dbus_connection_send_with_reply(connection, message, &call,
-                                               REQUEST_TIMEOUT) == FALSE) {
+                                       connman_timeout_input_request())
+                       == FALSE) {
                dbus_message_unref(message);
                g_free(username_password_reply);
                return -ESRCH;
@@ -613,7 +613,8 @@ int __connman_agent_request_browser(struct connman_service *service,
        }
 
        if (dbus_connection_send_with_reply(connection, message, &call,
-                                               REQUEST_TIMEOUT) == FALSE) {
+                                       connman_timeout_browser_launch())
+                       == FALSE) {
                dbus_message_unref(message);
                g_free(browser_reply_data);
                return -ESRCH;
@@ -701,7 +702,8 @@ int __connman_agent_report_error(struct connman_service *service,
        }
 
        if (dbus_connection_send_with_reply(connection, message, &call,
-                                               REQUEST_TIMEOUT) == FALSE) {
+                                       connman_timeout_input_request())
+                       == FALSE) {
                dbus_message_unref(message);
                g_free(report_error);
                return -ESRCH;