]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
D-Bus: Support fd passing with GFileDescriptorBased
authorMikkel Kamstrup Erlandsen <mikkel.kamstrup@canonical.com>
Wed, 26 Oct 2011 23:50:35 +0000 (01:50 +0200)
committerJürg Billeter <j@bitron.ch>
Thu, 2 Aug 2012 08:51:10 +0000 (10:51 +0200)
Fixes bug 662815.

codegen/valagdbusmodule.vala

index 262e7c07a7e9c7f9db21ae3a70b05dcd44f5b46c..acbde076a1f1aece639f13bddb0f9bf270ac832c 100644 (file)
@@ -102,7 +102,8 @@ public class Vala.GDBusModule : GVariantModule {
                if (type is ObjectType) {
                        if (type.data_type.get_full_name () == "GLib.UnixInputStream" ||
                            type.data_type.get_full_name () == "GLib.UnixOutputStream" ||
-                           type.data_type.get_full_name () == "GLib.Socket") {
+                           type.data_type.get_full_name () == "GLib.Socket" ||
+                           type.data_type.get_full_name () == "GLib.FileDescriptorBased") {
                                return true;
                        }
                }
@@ -138,6 +139,10 @@ public class Vala.GDBusModule : GVariantModule {
                                var result = new CCodeFunctionCall (new CCodeIdentifier ("g_socket_get_fd"));
                                result.add_argument (expr);
                                return result;
+                       } else if (type.data_type.get_full_name () == "GLib.FileDescriptorBased") {
+                               var result = new CCodeFunctionCall (new CCodeIdentifier ("g_file_descriptor_based_get_fd"));
+                               result.add_argument (expr);
+                               return result;
                        }
                }