From 4c865a7bbcded2f554a9d416296f80d14f8e864f Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Sat, 2 Jul 2016 23:37:08 +0200 Subject: [PATCH] discovery: use Socket.create_socket_source() Use Socket.create_socket_source() as it works for both TCP and UDP sockets, but also does not use GDatagramBased interface, thus should allow building on systems with older GLib versions. --- src/mconnect/discovery.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mconnect/discovery.vala b/src/mconnect/discovery.vala index 36c2901..23200f3 100644 --- a/src/mconnect/discovery.vala +++ b/src/mconnect/discovery.vala @@ -51,7 +51,7 @@ class Discovery : GLib.Object throw e; } - var source = (SocketSource) socket.create_source(IOCondition.IN); + var source = socket.create_socket_source(IOCondition.IN); source.set_callback((s, c) => { this.incomingPacket(); return true;