[Asterisk-code-review] res rtp: Fix regression when IPv6 is not available. (asterisk[master])
Alexei Gradinari
asteriskteam at digium.com
Wed Nov 30 09:45:25 CST 2016
Alexei Gradinari has posted comments on this change. ( https://gerrit.asterisk.org/4487 )
Change subject: res_rtp: Fix regression when IPv6 is not available.
......................................................................
Patch Set 5: Code-Review-1
(1 comment)
https://gerrit.asterisk.org/#/c/4487/5/res/res_pjsip_sdp_rtp.c
File res/res_pjsip_sdp_rtp.c:
Line 1527: prm.tp_type = PJSIP_TRANSPORT_UDP6;
> If any are active then an IPv6 SIP transport can be used and media will go
Why so complex?
I think better to add a simple function into main/utils.c
int ast_check_ipv6() {
int udp6_socket = socket(AF_INET6, SOCK_DGRAM, 0);
if (udp6_socket < 0) {
return 0;
} else {
close(udp6_socket);
return 1;
}
}
and call it in res/res_pjsip_sdp_rtp.c and res/res_pjsip_t38.c
if (ast_check_ipv6()) {
ast_sockaddr_parse(&address_rtp, "::", 0);
} else {
ast_sockaddr_parse(&address_rtp, "0.0.0.0", 0);
}
--
To view, visit https://gerrit.asterisk.org/4487
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I627a4e91795e821111e1cda523f083a40d0e0c3e
Gerrit-PatchSet: 5
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Guido Falsi <madpilot at freebsd.org>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Guido Falsi <madpilot at freebsd.org>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list