summaryrefslogtreecommitdiff
path: root/agent
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2016-06-21 16:41:50 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2016-06-21 16:41:50 -0400
commitea3d7e0de9568a4ec54a05e102ba4880cb825792 (patch)
tree6490432203d0d088dc8516dfe4fc75b18b293ce0 /agent
parent6be20ef460de4235b56ad94874e9f432aa320a30 (diff)
downloadlibnice-ea3d7e0de9568a4ec54a05e102ba4880cb825792.tar.gz
agent: Don't ask upnp to remove not yet allocated candidates
This caused a warning in Farstream tests.
Diffstat (limited to 'agent')
-rw-r--r--agent/agent.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/agent/agent.c b/agent/agent.c
index 08a2387..d819d27 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -2965,6 +2965,9 @@ void agent_remove_local_candidate (NiceAgent *agent, NiceCandidate *candidate)
if (candidate->type != NICE_CANDIDATE_TYPE_HOST)
return;
+ if (nice_address_get_port (&candidate->addr) == 0)
+ return;
+
nice_address_to_string (&candidate->addr, local_ip);
gupnp_simple_igd_remove_port_local (GUPNP_SIMPLE_IGD (agent->upnp), "UDP",