Changeset 885 for pjproject/trunk


Ignore:
Timestamp:
Jan 20, 2007 5:11:08 AM (18 years ago)
Author:
bennylp
Message:

Fix ticket #71: When host doesn't have any NIC interfaces, pj_gethostip() should return 127.0.0.1 instead of error

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/addr_resolv_sock.c

    r722 r885  
    8888        if (status != PJ_SUCCESS) { 
    8989            pj_sock_close(fd); 
    90             return status; 
     90            /* Return 127.0.0.1 as the address */ 
     91            return PJ_SUCCESS; 
    9192        } 
    9293 
     
    9596        if (status != PJ_SUCCESS) { 
    9697            pj_sock_close(fd); 
    97             return status; 
     98            /* Return 127.0.0.1 as the address */ 
     99            return PJ_SUCCESS; 
    98100        } 
    99101 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c

    r881 r885  
    881881        status = pj_gethostip(&p_pub_addr->sin_addr); 
    882882        if (status != PJ_SUCCESS) { 
     883            pjsua_perror(THIS_FILE, "Unable to get local host IP", status); 
    883884            pj_sock_close(sock); 
    884885            return status; 
Note: See TracChangeset for help on using the changeset viewer.