Commit 45b1822f authored by Youness Alaoui's avatar Youness Alaoui Committed by Olivier Crête

Do not create a socket_source if fileno is NULL

parent ce35ee5e
...@@ -68,9 +68,6 @@ socket_source_attach (SocketSource *socket_source, GMainContext *context) ...@@ -68,9 +68,6 @@ socket_source_attach (SocketSource *socket_source, GMainContext *context)
{ {
GSource *source; GSource *source;
if (socket_source->socket->fileno == NULL)
return;
/* Create a source. */ /* Create a source. */
source = g_socket_create_source (socket_source->socket->fileno, source = g_socket_create_source (socket_source->socket->fileno,
G_IO_IN, NULL); G_IO_IN, NULL);
...@@ -499,6 +496,9 @@ component_attach_socket (Component *component, NiceSocket *nicesock) ...@@ -499,6 +496,9 @@ component_attach_socket (Component *component, NiceSocket *nicesock)
g_assert (component->ctx != NULL); g_assert (component->ctx != NULL);
if (nicesock->fileno == NULL)
return;
/* Find an existing SocketSource in the component which contains @socket, or /* Find an existing SocketSource in the component which contains @socket, or
* create a new one. * create a new one.
* *
......
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