[evolution-data-server] [evolution-dbus-session] Handle method calls with GUnixFDList ][
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] [evolution-dbus-session] Handle method calls with GUnixFDList ][
- Date: Thu, 15 Nov 2018 09:12:24 +0000 (UTC)
commit 7abfd7b05c851012869b09fca04e7845dc05a6b0
Author: Milan Crha <mcrha redhat com>
Date: Thu Nov 15 10:12:50 2018 +0100
[evolution-dbus-session] Handle method calls with GUnixFDList ][
Handle also cases where the fdlist is only a return value, not an input
argument.
Related to https://gitlab.gnome.org/GNOME/evolution/issues/169
.../evolution-dbus-session.c | 57 +++++++++++-----------
1 file changed, 28 insertions(+), 29 deletions(-)
---
diff --git a/src/tools/evolution-dbus-session/evolution-dbus-session.c
b/src/tools/evolution-dbus-session/evolution-dbus-session.c
index 7c53d9dd2..f0c8e638c 100644
--- a/src/tools/evolution-dbus-session/evolution-dbus-session.c
+++ b/src/tools/evolution-dbus-session/evolution-dbus-session.c
@@ -178,33 +178,29 @@ handle_method_call_cb (GDBusConnection *connection,
message = g_dbus_method_invocation_get_message (invocation);
in_fd_list = g_dbus_message_get_unix_fd_list (message);
- if (in_fd_list) {
- result = g_dbus_connection_call_with_unix_fd_list_sync (g_dbus_proxy_get_connection
(pd->proxy),
- g_dbus_proxy_get_name (pd->proxy),
- object_path,
- interface_name,
- method_name,
- parameters,
- NULL,
- G_DBUS_CALL_FLAGS_NONE,
- DBUS_CALL_TIMEOUT,
- in_fd_list,
- &out_fd_list,
- NULL, &error);
- } else {
-#endif
- result = g_dbus_connection_call_sync (g_dbus_proxy_get_connection (pd->proxy),
- g_dbus_proxy_get_name (pd->proxy),
- object_path,
- interface_name,
- method_name,
- parameters,
- NULL,
- G_DBUS_CALL_FLAGS_NONE,
- DBUS_CALL_TIMEOUT,
- NULL, &error);
-#ifdef G_OS_UNIX
- }
+ result = g_dbus_connection_call_with_unix_fd_list_sync (g_dbus_proxy_get_connection (pd->proxy),
+ g_dbus_proxy_get_name (pd->proxy),
+ object_path,
+ interface_name,
+ method_name,
+ parameters,
+ NULL,
+ G_DBUS_CALL_FLAGS_NONE,
+ DBUS_CALL_TIMEOUT,
+ in_fd_list,
+ &out_fd_list,
+ NULL, &error);
+#else
+ result = g_dbus_connection_call_sync (g_dbus_proxy_get_connection (pd->proxy),
+ g_dbus_proxy_get_name (pd->proxy),
+ object_path,
+ interface_name,
+ method_name,
+ parameters,
+ NULL,
+ G_DBUS_CALL_FLAGS_NONE,
+ DBUS_CALL_TIMEOUT,
+ NULL, &error);
#endif
if (result) {
@@ -212,9 +208,12 @@ handle_method_call_cb (GDBusConnection *connection,
if (out_fd_list) {
g_dbus_method_invocation_return_value_with_unix_fd_list (invocation, result,
out_fd_list);
g_object_unref (out_fd_list);
- } else
- #endif
+ } else {
g_dbus_method_invocation_return_value (invocation, result);
+ }
+ #else
+ g_dbus_method_invocation_return_value (invocation, result);
+ #endif
g_variant_unref (result);
} else {
g_dbus_method_invocation_return_gerror (invocation, error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]