From 220c6829240b393a1afd2669da475c8aa79d3b4d Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Tue, 8 Apr 2014 03:37:59 -0400 Subject: [PATCH] do not set socket tos if fileno == NULL --- agent/agent.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agent/agent.c b/agent/agent.c index 0cc32b0..5138597 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -4239,6 +4239,9 @@ nice_agent_set_selected_remote_candidate ( void _priv_set_socket_tos (NiceAgent *agent, NiceSocket *sock, gint tos) { + if (sock->fileno == NULL) + return; + if (setsockopt (g_socket_get_fd (sock->fileno), IPPROTO_IP, IP_TOS, (const char *) &tos, sizeof (tos)) < 0) { nice_debug ("Agent %p: Could not set socket ToS: %s", agent, -- 2.7.4