Commit ecc2dcc9 authored by Filippo Della Betta's avatar Filippo Della Betta Committed by Youness Alaoui
Browse files

Use g_io_channel_win32_new_socket for windows

As glib documentation suggests (,
g_io_channel_unix_new should be avoided on WIN32 platform.
Replaced with g_io_channel_win32_new_socket function
parent db6f5f33
......@@ -2678,8 +2678,11 @@ agent_attach_stream_component_socket (NiceAgent *agent,
if (!component->ctx)
#ifndef G_OS_WIN32
io = g_io_channel_unix_new (socket->fileno);
io = g_io_channel_win32_new_socket (socket->fileno);
/* note: without G_IO_ERR the glib mainloop goes into
* busyloop if errors are encountered */
source = g_io_create_watch (io, G_IO_IN | G_IO_ERR);
......@@ -387,7 +387,11 @@ add_to_be_sent (NiceSocket *sock, const gchar *buf, guint len, gboolean head)
g_queue_push_tail (&priv->send_queue, tbs);
if (priv->io_channel == NULL) {
#ifndef G_OS_WIN32
priv->io_channel = g_io_channel_unix_new (sock->fileno);
priv->io_channel = g_io_channel_win32_new_socket (sock->fileno);
priv->io_source = g_io_create_watch (priv->io_channel, G_IO_OUT);
g_source_set_callback (priv->io_source, (GSourceFunc) socket_send_more,
sock, NULL);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment