[liboobs] Set D-Bus timeout to max for async replies
- From: Milan Bouchet-Valat <milanbv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [liboobs] Set D-Bus timeout to max for async replies
- Date: Fri, 20 Aug 2010 09:49:43 +0000 (UTC)
commit cd663d9bc455e5dcf2f8abd6e65194ce10821167
Author: Milan Bouchet-Valat <nalimilan club fr>
Date: Thu Aug 19 22:48:49 2010 +0200
Set D-Bus timeout to max for async replies
Some tasks can take a long time to complete, and the backends
don't reply until they are done. Increase the timeout when
committing asynchronously to avoid getting an error. This means
we can end up with an infinite progress bar and no error, but
that's as helpful as a timeout error, and it's the only solution
without a deep refactoring of the backends.
oobs/oobs-object.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/oobs/oobs-object.c b/oobs/oobs-object.c
index 0e36882..1b6d03c 100644
--- a/oobs/oobs-object.c
+++ b/oobs/oobs-object.c
@@ -471,7 +471,9 @@ run_message_async (OobsObject *object,
}
connection = _oobs_session_get_connection_bus (priv->session);
- dbus_connection_send_with_reply (connection, message, &call, -1);
+ /* Ideally, backends should reply quickly, possibly saying operation is still pending.
+ * Since they currently block without replying, set the timeout to something long. */
+ dbus_connection_send_with_reply (connection, message, &call, INT_MAX);
async_data = g_new0 (OobsObjectAsyncCallbackData, 1);
async_data->object = g_object_ref (object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]