Changeset 5297 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
- Timestamp:
- May 13, 2016 10:56:48 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r5283 r5297 1377 1377 1378 1378 /* 1379 * Update STUN servers. 1380 */ 1381 PJ_DEF(pj_status_t) pjsua_update_stun_servers(unsigned count, pj_str_t srv[], 1382 pj_bool_t wait) 1383 { 1384 unsigned i; 1385 pj_status_t status; 1386 1387 PJ_ASSERT_RETURN(count && srv, PJ_EINVAL); 1388 1389 PJSUA_LOCK(); 1390 1391 pjsua_var.ua_cfg.stun_srv_cnt = count; 1392 for (i = 0; i < count; i++) { 1393 if (pj_strcmp(&pjsua_var.ua_cfg.stun_srv[i], &srv[i])) 1394 pj_strdup(pjsua_var.pool, &pjsua_var.ua_cfg.stun_srv[i], &srv[i]); 1395 } 1396 pjsua_var.stun_status = PJ_EUNKNOWN; 1397 1398 status = resolve_stun_server(wait); 1399 if (wait == PJ_FALSE && status == PJ_EPENDING) 1400 status = PJ_SUCCESS; 1401 1402 PJSUA_UNLOCK(); 1403 1404 return status; 1405 } 1406 1407 1408 /* 1379 1409 * Resolve STUN server. 1380 1410 */ … … 1482 1512 /* Perform NAT type detection if not yet */ 1483 1513 if (pjsua_var.nat_type == PJ_STUN_NAT_TYPE_UNKNOWN && 1514 !pjsua_var.nat_in_progress && 1484 1515 pjsua_var.ua_cfg.nat_type_in_sdp) 1485 1516 {
Note: See TracChangeset
for help on using the changeset viewer.