summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pjlib/src/pj/addr_resolv_sock.c6
-rw-r--r--pjsip/src/pjsua-lib/pjsua_core.c1
2 files changed, 5 insertions, 2 deletions
diff --git a/pjlib/src/pj/addr_resolv_sock.c b/pjlib/src/pj/addr_resolv_sock.c
index af3d40c3..e433dc32 100644
--- a/pjlib/src/pj/addr_resolv_sock.c
+++ b/pjlib/src/pj/addr_resolv_sock.c
@@ -87,14 +87,16 @@ pj_status_t pj_gethostip(pj_in_addr *addr)
status = pj_sock_connect(fd, &a, sizeof(a));
if (status != PJ_SUCCESS) {
pj_sock_close(fd);
- return status;
+ /* Return 127.0.0.1 as the address */
+ return PJ_SUCCESS;
}
len = sizeof(a);
status = pj_sock_getsockname(fd, &a, &len);
if (status != PJ_SUCCESS) {
pj_sock_close(fd);
- return status;
+ /* Return 127.0.0.1 as the address */
+ return PJ_SUCCESS;
}
pj_sock_close(fd);
diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c
index b7194111..79b39283 100644
--- a/pjsip/src/pjsua-lib/pjsua_core.c
+++ b/pjsip/src/pjsua-lib/pjsua_core.c
@@ -880,6 +880,7 @@ static pj_status_t create_sip_udp_sock(pj_in_addr bound_addr,
status = pj_gethostip(&p_pub_addr->sin_addr);
if (status != PJ_SUCCESS) {
+ pjsua_perror(THIS_FILE, "Unable to get local host IP", status);
pj_sock_close(sock);
return status;
}