[Asterisk-code-review] res pjsip: Add common ast sip get host ip API. (asterisk[certified/13.1])

Joshua Colp asteriskteam at digium.com
Tue Aug 25 11:57:45 CDT 2015


Joshua Colp has uploaded a new patch set (#2).

Change subject: res_pjsip: Add common ast_sip_get_host_ip API.
......................................................................

res_pjsip: Add common ast_sip_get_host_ip API.

Modules commonly used the pj_gethostip function for retrieving the
IP address of the host. This function does not cache the result and may
result in a DNS lookup occurring, or additional work. If the DNS
server is unreachable or network issues arise this can cause the
pj_gethostip function to block for a period of time.

This change adds an ast_sip_get_host_ip and ast_sip_get_host_ip_string
function which does the same thing but caches the host IP address at
module load time. This results in no additional work being done each
time the local host IP address is needed.

ASTERISK-25342 #close

Change-Id: I3205deb679b01fa5ac05a94b623bfd620a2abe1e
---
M include/asterisk/res_pjsip.h
M res/res_pjsip.c
M res/res_pjsip_multihomed.c
M res/res_pjsip_sdp_rtp.c
M res/res_pjsip_session.c
M res/res_pjsip_t38.c
6 files changed, 94 insertions(+), 42 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/38/1138/2
-- 
To view, visit https://gerrit.asterisk.org/1138
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3205deb679b01fa5ac05a94b623bfd620a2abe1e
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: certified/13.1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list