[PATCH spice-server 12/33] event-loop: Use socket compatibility layer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/event-loop.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/event-loop.c b/server/event-loop.c
index 413102e8..56200ce5 100644
--- a/server/event-loop.c
+++ b/server/event-loop.c
@@ -153,16 +153,16 @@ static void watch_update_mask(const SpiceCoreInterfaceInternal *iface,
 }
 
 static SpiceWatch *watch_add(const SpiceCoreInterfaceInternal *iface,
-                             int fd, int event_mask, SpiceWatchFunc func, void *opaque)
+                             socket_t fd, int event_mask, SpiceWatchFunc func, void *opaque)
 {
     SpiceWatch *watch;
 
-    spice_return_val_if_fail(fd != -1, NULL);
+    spice_return_val_if_fail(socket_is_valid(fd), NULL);
     spice_return_val_if_fail(func != NULL, NULL);
 
     watch = g_new0(SpiceWatch, 1);
     watch->context = iface->main_context;
-    watch->channel = g_io_channel_unix_new(fd);
+    watch->channel = g_io_channel_unix_new(socket_get_raw(fd));
     watch->func = func;
     watch->opaque = opaque;
 
-- 
2.17.2

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]