[Spice-devel] [PATCH spice-server v3 13/32] event-loop: Use socket compatibility layer
Frediano Ziglio
fziglio at redhat.com
Mon Jan 7 18:01:56 UTC 2019
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
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.20.1
More information about the Spice-devel
mailing list