GDBus GIO: no timeout for D-Bus method invocations

When calling a method, give the peer unlimited time to reply. Relevant
in particular for local sync, where the time for processing a message
is basically unpredictable.

Communication with the D-Bus daemon still uses the default timeout.
This commit is contained in:
Patrick Ohly 2012-01-16 17:04:31 +01:00
parent b437a01f9e
commit 616d51b34c

View file

@ -1894,7 +1894,7 @@ class DBusWatch : public Watch
g_variant_new("(s)", peer),
G_VARIANT_TYPE("(b)"),
G_DBUS_CALL_FLAGS_NONE,
-1,
-1, // default timeout
NULL,
&error);
@ -3964,7 +3964,8 @@ protected:
{
CallbackData *data = new CallbackData(m_conn, callback);
g_dbus_connection_send_message_with_reply(m_conn.get(), msg.get(), G_DBUS_SEND_MESSAGE_FLAGS_NONE,
-1, NULL, NULL, m_dbusCallback, data);
G_MAXINT, // no timeout
NULL, NULL, m_dbusCallback, data);
}
public: