Changeset 5307 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
- Timestamp:
- May 19, 2016 4:30:05 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r5297 r5307 394 394 ((acc->cfg.media_stun_use & PJSUA_STUN_RETRY_ON_FAILURE)!=0)) 395 395 { 396 PJ_LOG(4,(THIS_FILE, "Failed to get STUN mapped address, " 397 "retrying other STUN servers")); 396 pj_str_t srv = 397 pjsua_var.ua_cfg.stun_srv[pjsua_var.stun_srv_idx]; 398 399 PJ_LOG(4,(THIS_FILE, "Failed to get STUN mapped address, " 400 "retrying other STUN servers")); 401 402 if (pjsua_var.stun_srv_idx < pjsua_var.ua_cfg.stun_srv_cnt-1) { 403 PJSUA_LOCK(); 404 /* Move the unusable STUN server to the last position 405 * as the least prioritize. 406 */ 407 pj_array_erase(pjsua_var.ua_cfg.stun_srv, 408 sizeof(pj_str_t), 409 pjsua_var.ua_cfg.stun_srv_cnt, 410 pjsua_var.stun_srv_idx); 411 412 pj_array_insert(pjsua_var.ua_cfg.stun_srv, 413 sizeof(pj_str_t), 414 pjsua_var.ua_cfg.stun_srv_cnt-1, 415 pjsua_var.ua_cfg.stun_srv_cnt-1, 416 &srv); 417 418 PJSUA_UNLOCK(); 419 } 398 420 status=pjsua_update_stun_servers(pjsua_var.ua_cfg.stun_srv_cnt, 399 421 pjsua_var.ua_cfg.stun_srv, 400 PJ_TRUE); 422 PJ_FALSE); 423 424 if (status == PJ_SUCCESS) 425 status = resolve_stun_server(PJ_TRUE); 426 401 427 if (status == PJ_SUCCESS) { 402 428 if (pjsua_var.stun_srv.addr.sa_family != 0) {
Note: See TracChangeset
for help on using the changeset viewer.