[Nice] [nice/master] store the udp_turn relay socket into component->sockets so it gets freed at the end too

Youness Alaoui youness.alaoui at collabora.co.uk
Wed Nov 12 16:48:29 PST 2008


---
 agent/discovery.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/agent/discovery.c b/agent/discovery.c
index 4cafe67..2629842 100644
--- a/agent/discovery.c
+++ b/agent/discovery.c
@@ -571,6 +571,11 @@ discovery_add_relay_candidate (
 
       result = priv_add_local_candidate_pruned (component, candidate);
       if (result) {
+        GSList *modified_list = g_slist_append (component->sockets, relay_socket);
+        if (modified_list) {
+          /* success: store a pointer to the sockaddr */
+          component->sockets = modified_list;
+        }
         agent_signal_new_candidate (agent, candidate);
       } else {
         /* error: memory allocation, or duplicate candidate */
-- 
1.5.6.5




More information about the Nice mailing list