summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Ljungdahl <emillj@axis.com>2023-12-21 14:41:03 +0100
committerEmil Ljungdahl <emillj@axis.com>2023-12-21 14:46:16 +0100
commit952d8375a29594c90a323afe1c0de1ce5fc5bfda (patch)
treeb10eb3ce0d07de70c27e4d09b5bfdb34f1855017
parentd053572c49f1ff5c51740cf6bbc816aadc29087a (diff)
Include TURN sockets in nice_agent_get_sockets()
nice_agent_get_sockets() is documented as "to retrieve them all". However, sockets related to TURN connections was not included as part of the list, but they are most probably just as important to modify from outside.
-rw-r--r--agent/component.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/agent/component.c b/agent/component.c
index cb7d098..92347b1 100644
--- a/agent/component.c
+++ b/agent/component.c
@@ -1717,9 +1717,9 @@ nice_component_get_sockets (NiceComponent *component)
GPtrArray *array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
GSList *item;
- for (item = component->local_candidates; item; item = item->next) {
- NiceCandidateImpl *c = item->data;
- NiceSocket *nicesock = c->sockptr;
+ for (item = component->socket_sources; item; item = item->next) {
+ SocketSource *source = item->data;
+ NiceSocket *nicesock = source->socket;
if (nicesock->fileno && !g_ptr_array_find (array, nicesock->fileno, NULL))
g_ptr_array_add (array, g_object_ref (nicesock->fileno));