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.
+#define REQUEST_TIMEOUT (120 * 1000) /* 120 seconds */
+
static DBusConnection *connection = NULL;
static guint agent_watch = 0;
static gchar *agent_path = NULL;
static DBusConnection *connection = NULL;
static guint agent_watch = 0;
static gchar *agent_path = NULL;
- 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;
dbus_message_unref(message);
g_free(passphrase_reply);
return -ESRCH;
- 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;
dbus_message_unref(message);
g_free(username_password_reply);
return -ESRCH;
- 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;
dbus_message_unref(message);
g_free(browser_reply_data);
return -ESRCH;
- 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;
dbus_message_unref(message);
g_free(report_error);
return -ESRCH;