summaryrefslogtreecommitdiff
path: root/res/res_pjsip_sdp_rtp.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-03-20 14:39:20 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-03-20 14:39:20 -0500
commitf5603cb1ece5001d1288004c9bc6ed51448deb81 (patch)
tree14d6772aef8cab428a5053431ea8f79372b1b9ce /res/res_pjsip_sdp_rtp.c
parent24ada76408db41e5664b60f07e8940744d97a4c6 (diff)
parente6dc28b78fbb8ae606daf1700a09772401ca063e (diff)
Merge "res/res_pjsip_session: Only check localnet if it is defined"
Diffstat (limited to 'res/res_pjsip_sdp_rtp.c')
-rw-r--r--res/res_pjsip_sdp_rtp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index ed91de289..a82475774 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -1487,10 +1487,11 @@ static void change_outgoing_sdp_stream_media_address(pjsip_tx_data *tdata, struc
ast_sockaddr_parse(&addr, host, PARSE_PORT_FORBID);
/* Is the address within the SDP inside the same network? */
- if (ast_apply_ha(transport_state->localnet, &addr) == AST_SENSE_ALLOW) {
+ if (transport_state->localnet
+ && ast_apply_ha(transport_state->localnet, &addr) == AST_SENSE_ALLOW) {
return;
}
-
+ ast_debug(5, "Setting media address to %s\n", transport->external_media_address);
pj_strdup2(tdata->pool, &stream->conn->addr, transport->external_media_address);
}