diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2012-05-23 06:52:35 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-05-23 06:52:35 +0200 |
commit | 52889168f73566d75d470e6dd8ca28d42ea90961 (patch) | |
tree | be8b2df2889ad6d6a2b333ae9e626ab498884e90 | |
parent | 85739ac8da4048e82a04463d186483b07a1f94b2 (diff) | |
download | connman-52889168f73566d75d470e6dd8ca28d42ea90961.tar.gz connman-52889168f73566d75d470e6dd8ca28d42ea90961.tar.bz2 connman-52889168f73566d75d470e6dd8ca28d42ea90961.zip |
agent: Increase default timeout to 120 seconds
The D-Bus default timeout is 25 seconds and that is clearly not enough time
to enter a passphrase. Increasing this to 120 seconds now.
-rw-r--r-- | src/agent.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/agent.c b/src/agent.c index ebee19c9..cca9ebcd 100644 --- a/src/agent.c +++ b/src/agent.c @@ -31,6 +31,8 @@ #include "connman.h" +#define REQUEST_TIMEOUT (120 * 1000) /* 120 seconds */ + static DBusConnection *connection = NULL; static guint agent_watch = 0; static gchar *agent_path = NULL; @@ -456,8 +458,8 @@ int __connman_agent_request_passphrase_input(struct connman_service *service, return -ENOMEM; } - if (dbus_connection_send_with_reply(connection, message, - &call, -1) == FALSE) { + if (dbus_connection_send_with_reply(connection, message, &call, + REQUEST_TIMEOUT) == FALSE) { dbus_message_unref(message); g_free(passphrase_reply); return -ESRCH; @@ -522,8 +524,8 @@ int __connman_agent_request_login_input(struct connman_service *service, return -ENOMEM; } - if (dbus_connection_send_with_reply(connection, message, - &call, -1) == FALSE) { + if (dbus_connection_send_with_reply(connection, message, &call, + REQUEST_TIMEOUT) == FALSE) { dbus_message_unref(message); g_free(username_password_reply); return -ESRCH; @@ -610,8 +612,8 @@ int __connman_agent_request_browser(struct connman_service *service, return -ENOMEM; } - if (dbus_connection_send_with_reply(connection, message, - &call, -1) == FALSE) { + if (dbus_connection_send_with_reply(connection, message, &call, + REQUEST_TIMEOUT) == FALSE) { dbus_message_unref(message); g_free(browser_reply_data); return -ESRCH; @@ -698,8 +700,8 @@ int __connman_agent_report_error(struct connman_service *service, return -ENOMEM; } - if (dbus_connection_send_with_reply(connection, message, - &call, -1) == FALSE) { + if (dbus_connection_send_with_reply(connection, message, &call, + REQUEST_TIMEOUT) == FALSE) { dbus_message_unref(message); g_free(report_error); return -ESRCH; |