[glib/wip/kdbus-junk] kdbus: use an absolute value for kmsg->timeout_ns
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/kdbus-junk] kdbus: use an absolute value for kmsg->timeout_ns
- Date: Fri, 12 Dec 2014 13:26:50 +0000 (UTC)
commit c80652e29fe9c43c124fa0ff0d3a42306b8c4aad
Author: Lukasz Skalski <l skalski samsung com>
Date: Thu Dec 11 13:05:53 2014 +0000
kdbus: use an absolute value for kmsg->timeout_ns
Solution with KDBUS_TIMEOUT_NS macro is temporary - for test purposes.
We have to find better solution for setting timeout value
Conflicts:
gio/gkdbus.c
gio/gkdbus.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gio/gkdbus.c b/gio/gkdbus.c
index 01d789e..cb614c2 100644
--- a/gio/gkdbus.c
+++ b/gio/gkdbus.c
@@ -51,6 +51,7 @@
#include "glibintl.h"
#include "gunixfdmessage.h"
+#define KDBUS_TIMEOUT_NS 2000000000LU
#define KDBUS_POOL_SIZE (16 * 1024LU * 1024LU)
#define KDBUS_ALIGN8(l) (((l) + 7) & ~7)
#define KDBUS_ALIGN8_PTR(p) ((void*) (uintptr_t)(p))
@@ -1983,7 +1984,7 @@ _g_kdbus_send (GKDBusWorker *kdbus,
((g_dbus_message_get_flags (message) & G_DBUS_MESSAGE_FLAGS_NO_AUTO_START) ?
KDBUS_MSG_NO_AUTO_START : 0);
if ((msg->flags) & KDBUS_MSG_EXPECT_REPLY)
- msg->timeout_ns = 2000000000;
+ msg->timeout_ns = 1000LU * g_get_monotonic_time() + KDBUS_TIMEOUT_NS;
else
msg->cookie_reply = g_dbus_message_get_reply_serial(message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]