Skip to content
Snippets Groups Projects
Commit 05bc0fad authored by jrun's avatar jrun Committed by Sébastien Blin
Browse files

ice: do not ignore port in stun server param

Change-Id: I9b761772c7a05a36cfc5eb52a5db1e629c303449
parent 2d8ad9c2
No related branches found
No related tags found
No related merge requests found
...@@ -230,11 +230,12 @@ add_stun_server(pj_pool_t& pool, pj_ice_strans_cfg& cfg, const StunServerInfo& i ...@@ -230,11 +230,12 @@ add_stun_server(pj_pool_t& pool, pj_ice_strans_cfg& cfg, const StunServerInfo& i
pj_ice_strans_stun_cfg_default(&stun); pj_ice_strans_stun_cfg_default(&stun);
pj_strdup2_with_null(&pool, &stun.server, ip.toString().c_str()); pj_strdup2_with_null(&pool, &stun.server, ip.toString().c_str());
stun.af = ip.getFamily(); stun.af = ip.getFamily();
if (!(stun.port = ip.getPort()))
stun.port = PJ_STUN_PORT; stun.port = PJ_STUN_PORT;
stun.cfg.max_pkt_size = STUN_MAX_PACKET_SIZE; stun.cfg.max_pkt_size = STUN_MAX_PACKET_SIZE;
stun.conn_type = cfg.stun.conn_type; stun.conn_type = cfg.stun.conn_type;
JAMI_DBG("[ice] added stun server '%s', port %d", pj_strbuf(&stun.server), stun.port); JAMI_DBG("[ice] added stun server '%s', port %u", pj_strbuf(&stun.server), stun.port);
} }
static void static void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment