- Timestamp:
- Dec 1, 2007 9:04:24 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/ice_strans.c
r1548 r1604 347 347 /* Socket is bound to INADDR_ANY */ 348 348 unsigned i, ifs_cnt; 349 pj_ in_addr ifs[PJ_ICE_ST_MAX_CAND-2];349 pj_sockaddr ifs[PJ_ICE_ST_MAX_CAND-2]; 350 350 351 351 /* Reset default candidate */ … … 354 354 /* Enum all IP interfaces in the host */ 355 355 ifs_cnt = PJ_ARRAY_SIZE(ifs); 356 status = pj_enum_ip_interface( &ifs_cnt, ifs);356 status = pj_enum_ip_interface(pj_AF_INET(), &ifs_cnt, ifs); 357 357 if (status != PJ_SUCCESS) 358 358 goto on_error; 359 359 360 360 /* Set default IP interface as the base address */ 361 status = pj_gethostip( &comp->local_addr.ipv4.sin_addr);361 status = pj_gethostip(pj_AF_INET(), &comp->local_addr); 362 362 if (status != PJ_SUCCESS) 363 363 goto on_error; … … 370 370 371 371 /* Ignore 127.0.0.0/24 address */ 372 if ((pj_ntohl(ifs[i]. s_addr) >> 24)==127)372 if ((pj_ntohl(ifs[i].ipv4.sin_addr.s_addr) >> 24)==127) 373 373 continue; 374 374 375 375 pj_memcpy(&cand_addr, &comp->local_addr, sizeof(pj_sockaddr_in)); 376 cand_addr.sin_addr.s_addr = ifs[i]. s_addr;376 cand_addr.sin_addr.s_addr = ifs[i].ipv4.sin_addr.s_addr; 377 377 378 378 … … 380 380 * as default candidate. 381 381 */ 382 if (ifs[i]. s_addr == comp->local_addr.ipv4.sin_addr.s_addr) {382 if (ifs[i].ipv4.sin_addr.s_addr == comp->local_addr.ipv4.sin_addr.s_addr) { 383 383 set_default = PJ_TRUE; 384 384 local_pref = 65535; … … 413 413 */ 414 414 if (comp->local_addr.ipv4.sin_addr.s_addr == 0) { 415 status = pj_gethostip( &comp->local_addr.ipv4.sin_addr);415 status = pj_gethostip(pj_AF_INET(), &comp->local_addr); 416 416 if (status != PJ_SUCCESS) 417 417 return status;
Note: See TracChangeset
for help on using the changeset viewer.