diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-05-29 16:19:29 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-05-30 12:29:14 +0300 |
commit | f351593fb992ce7b0eb40b933237d12b87e990fc (patch) | |
tree | 94874f36c2bde4b09a8613e1ffcdc11e5b68d926 /src/agent.c | |
parent | 2ef4498938f48b2ce6acfede0b37d54fb71e03f0 (diff) | |
download | connman-f351593fb992ce7b0eb40b933237d12b87e990fc.tar.gz connman-f351593fb992ce7b0eb40b933237d12b87e990fc.tar.bz2 connman-f351593fb992ce7b0eb40b933237d12b87e990fc.zip |
agent: Use input request and browser launch timeouts
Diffstat (limited to 'src/agent.c')
-rw-r--r-- | src/agent.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/agent.c b/src/agent.c index 82dc46d7..581f977c 100644 --- a/src/agent.c +++ b/src/agent.c @@ -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; |