diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-06-01 19:51:59 -0400 |
---|---|---|
committer | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2009-06-02 13:19:51 -0400 |
commit | bde24e05557e962037710137a1cf1148b0822e61 (patch) | |
tree | c24bcacfef0f9c57c4320059947fce60ba2e2b47 | |
parent | 07e8358986bc13e933c293e75b47f171a2a59e48 (diff) | |
download | libnice-bde24e05557e962037710137a1cf1148b0822e61.tar.gz |
Use thread-safe version of GUPnP Simple IGD
-rw-r--r-- | agent/agent-priv.h | 4 | ||||
-rw-r--r-- | agent/agent.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/agent/agent-priv.h b/agent/agent-priv.h index c3d389f..cdc2698 100644 --- a/agent/agent-priv.h +++ b/agent/agent-priv.h @@ -61,7 +61,7 @@ #include "stun/usages/ice.h" #ifdef HAVE_GUPNP -#include <libgupnp-igd/gupnp-simple-igd.h> +#include <libgupnp-igd/gupnp-simple-igd-thread.h> #endif /* XXX: starting from ICE ID-18, Ta SHOULD now be set according @@ -113,7 +113,7 @@ struct _NiceAgent NiceCompatibility compatibility; /* property: Compatibility mode */ StunAgent stun_agent; /* STUN agent */ #ifdef HAVE_GUPNP - GUPnPSimpleIgd* upnp; /* GUPnP Single IGD agent */ + GUPnPSimpleIgdThread* upnp; /* GUPnP Single IGD agent */ gboolean upnp_enabled; /* whether UPnP discovery is enabled */ guint upnp_timeout; /* UPnP discovery timeout */ GSList *upnp_mapping; /* list of Candidates being mapped */ diff --git a/agent/agent.c b/agent/agent.c index 819c50c..e8ebc4e 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -1286,7 +1286,7 @@ nice_agent_gather_candidates ( priv_free_upnp (agent); if (agent->upnp_enabled) { - agent->upnp = gupnp_simple_igd_new (agent->main_context); + agent->upnp = gupnp_simple_igd_thread_new (); agent->upnp_timer_source = agent_timeout_add_with_context (agent, agent->upnp_timeout, priv_upnp_timeout_cb, agent); @@ -1349,7 +1349,7 @@ nice_agent_gather_candidates ( NiceAddress *addr = nice_address_dup (&host_candidate->base_addr); nice_debug ("Agent %p: Adding UPnP port %s:%d", agent, local_ip, nice_address_get_port (&host_candidate->base_addr)); - gupnp_simple_igd_add_port (agent->upnp, "UDP", + gupnp_simple_igd_add_port (GUPNP_SIMPLE_IGD (agent->upnp), "UDP", 0, local_ip, nice_address_get_port (&host_candidate->base_addr), 0, PACKAGE_STRING); agent->upnp_mapping = g_slist_prepend (agent->upnp_mapping, addr); |