- Timestamp:
- Mar 1, 2007 5:28:35 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/pjproject-0.5-stable/pjlib/src/pj/addr_resolv_sock.c
r1022 r1024 60 60 const pj_str_t *hostname = pj_gethostname(); 61 61 struct pj_hostent he; 62 pj_str_t cp;63 pj_in_addr loopip;64 62 pj_status_t status; 65 63 66 cp = pj_str("127.0.0.1");67 loopip = pj_inet_addr(&cp);68 64 69 65 #ifdef _MSC_VER … … 79 75 80 76 81 /* If we end up with 127. 0.0.1, resolve the IP by getting the default77 /* If we end up with 127.x.x.x, resolve the IP by getting the default 82 78 * interface to connect to some public host. 83 79 */ 84 if (status != PJ_SUCCESS || addr->s_addr == loopip.s_addr) {80 if (status != PJ_SUCCESS || (pj_ntohl(addr->s_addr) >> 24)==127) { 85 81 pj_sock_t fd; 82 pj_str_t cp; 86 83 pj_sockaddr_in a; 87 84 int len;
Note: See TracChangeset
for help on using the changeset viewer.