diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2012-01-16 17:04:31 +0100 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2012-01-17 13:22:10 +0000 |
commit | 616d51b34c9896250df80d4e3e57cc71bafd705b (patch) | |
tree | 281efcb502e6107d1596265b0b8c87cb76a5829d | |
parent | b437a01f9e60c9758935e177bcac1f709aa925eb (diff) |
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.
-rw-r--r-- | src/gdbusxx/gdbus-cxx-bridge.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gdbusxx/gdbus-cxx-bridge.h b/src/gdbusxx/gdbus-cxx-bridge.h index 1f6e1a07..95418b54 100644 --- a/src/gdbusxx/gdbus-cxx-bridge.h +++ b/src/gdbusxx/gdbus-cxx-bridge.h @@ -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: |