diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2013-04-25 10:59:06 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2013-04-25 10:59:06 +0000 |
commit | de15f2f1b5e2aa0428f0b6ce85530b9f6de6d040 (patch) | |
tree | a9d82824b12552dcf7f1cb0c96aec97c114be760 /pjsip | |
parent | 520886a50988f2b5bff9f9b152e8ecbe45568178 (diff) |
Fixed #1660: SIP transport fallbacks to use default interface when pj_getipinterface() fails in getting local interface for the specified destination.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4504 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r-- | pjsip/src/pjsip/sip_transport.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pjsip/src/pjsip/sip_transport.c b/pjsip/src/pjsip/sip_transport.c index cb2d3679..1edda409 100644 --- a/pjsip/src/pjsip/sip_transport.c +++ b/pjsip/src/pjsip/sip_transport.c @@ -1244,8 +1244,16 @@ static pj_status_t get_net_interface(pjsip_transport_type_e tp_type, af = (tp_type & PJSIP_TRANSPORT_IPV6)? PJ_AF_INET6 : PJ_AF_INET; status = pj_getipinterface(af, dst, &itf_addr, PJ_FALSE, NULL); - if (status != PJ_SUCCESS) - return status; + if (status != PJ_SUCCESS) { + /* If it fails, e.g: on WM6 (http://support.microsoft.com/kb/129065), + * just fallback using pj_gethostip(), see ticket #1660. + */ + PJ_LOG(5,(THIS_FILE,"Warning: unable to determine local " + "interface, fallback to default interface!")); + status = pj_gethostip(af, &itf_addr); + if (status != PJ_SUCCESS) + return status; + } /* Print address */ pj_sockaddr_print(&itf_addr, itf_str_addr->ptr, |