agent: Don’t clear the PseudoTcpSocket on error
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Fri, 8 Aug 2014 07:44:49 +0000 (08:44 +0100)
committerOlivier Crête <olivier.crete@collabora.com>
Thu, 21 Aug 2014 18:33:11 +0000 (14:33 -0400)
Instead, keep the closed object around. This allows differentiation
between the states: TCP support was never initialised; and TCP support
was initialised but is now closed.

agent/agent.c

index 836aedd..010c8e5 100644 (file)
@@ -1384,7 +1384,6 @@ static void priv_pseudo_tcp_error (NiceAgent *agent, Stream *stream,
         component->id, NICE_COMPONENT_STATE_FAILED);
     component_detach_all_sockets (component);
     pseudo_tcp_socket_close (component->tcp, TRUE);
-    g_clear_object (&component->tcp);
   }
 
   if (component->tcp_clock) {