Changeset 5383
- Timestamp:
- Jul 14, 2016 5:15:16 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r5382 r5383 1332 1332 /* Loop while we have entry to try */ 1333 1333 for (; sess->idx < sess->count; ++sess->idx) { 1334 const int af = pj_AF_INET();1334 int af; 1335 1335 char target[64]; 1336 1336 pj_str_t hostpart; … … 1345 1345 1346 1346 /* Parse the server entry into host:port */ 1347 status = pj_sockaddr_parse2( af, 0, &sess->srv[sess->idx],1348 &hostpart, &port, NULL);1347 status = pj_sockaddr_parse2(pj_AF_UNSPEC(), 0, &sess->srv[sess->idx], 1348 &hostpart, &port, &af); 1349 1349 if (status != PJ_SUCCESS) { 1350 1350 PJ_LOG(2,(THIS_FILE, "Invalid STUN server entry %s", target)); 1351 continue; 1352 } else if (af != pj_AF_INET()) { 1353 /* Ignore IPv6 STUN server for now */ 1354 status = PJ_EAFNOTSUP; 1355 PJ_LOG(3,(THIS_FILE, "Ignored STUN server entry %s, currently " 1356 "only IPv4 STUN server is supported (does " 1357 "IPv6 still need a mapped address?)", 1358 target)); 1351 1359 continue; 1352 1360 } … … 1365 1373 stun_sock_cb.on_status = &test_stun_on_status; 1366 1374 status = pj_stun_sock_create(&pjsua_var.stun_cfg, "stunresolve", 1367 1368 1375 pj_AF_INET(), &stun_sock_cb, 1376 NULL, sess, &sess->stun_sock); 1369 1377 if (status != PJ_SUCCESS) { 1370 1378 char errmsg[PJ_ERR_MSG_SIZE]; … … 1377 1385 } 1378 1386 1379 status = pj_stun_sock_start(sess->stun_sock, &hostpart, 1380 port,pjsua_var.resolver);1387 status = pj_stun_sock_start(sess->stun_sock, &hostpart, port, 1388 pjsua_var.resolver); 1381 1389 if (status != PJ_SUCCESS) { 1382 1390 char errmsg[PJ_ERR_MSG_SIZE];
Note: See TracChangeset
for help on using the changeset viewer.