Date: Wed, 30 Nov 2016 21:52:22 +0000 (UTC) From: Guido Falsi <madpilot@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r427462 - in head/net/asterisk13: . files Message-ID: <201611302152.uAULqMUE057118@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: madpilot Date: Wed Nov 30 21:52:22 2016 New Revision: 427462 URL: https://svnweb.freebsd.org/changeset/ports/427462 Log: Align patches with the fix submitted upstream. Obtained from: https://issues.asterisk.org/jira/browse/ASTERISK-26617 Added: head/net/asterisk13/files/patch-include_asterisk_utils.h (contents, props changed) head/net/asterisk13/files/patch-main_utils.c (contents, props changed) head/net/asterisk13/files/patch-res_res__pjsip__sdp__rtp.c (contents, props changed) head/net/asterisk13/files/patch-res_res__pjsip__t38.c (contents, props changed) Deleted: head/net/asterisk13/files/patch-main_udptl.c head/net/asterisk13/files/patch-res_res__rtp__asterisk.c Modified: head/net/asterisk13/Makefile Modified: head/net/asterisk13/Makefile ============================================================================== --- head/net/asterisk13/Makefile Wed Nov 30 21:51:07 2016 (r427461) +++ head/net/asterisk13/Makefile Wed Nov 30 21:52:22 2016 (r427462) @@ -2,6 +2,7 @@ PORTNAME= asterisk PORTVERSION= 13.13.0 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://downloads.asterisk.org/pub/telephony/%SUBDIR%/:DEFAULT,g729 MASTER_SITE_SUBDIR= asterisk/ \ Added: head/net/asterisk13/files/patch-include_asterisk_utils.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/asterisk13/files/patch-include_asterisk_utils.h Wed Nov 30 21:52:22 2016 (r427462) @@ -0,0 +1,16 @@ +--- include/asterisk/utils.h.orig 2016-11-23 15:26:01 UTC ++++ include/asterisk/utils.h +@@ -1127,4 +1127,13 @@ int ast_file_is_readable(const char *fil + */ + int ast_compare_versions(const char *version1, const char *version2); + ++/* ++ * \brief Test that an OS supports IPv6 Networking. ++ * \since 13.14.0 ++ * ++ * \return True (non-zero) if the IPv6 supported. ++ * \return False (zero) if the OS doesn't support IPv6. ++ */ ++int ast_check_ipv6(void); ++ + #endif /* _ASTERISK_UTILS_H */ Added: head/net/asterisk13/files/patch-main_utils.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/asterisk13/files/patch-main_utils.c Wed Nov 30 21:52:22 2016 (r427462) @@ -0,0 +1,21 @@ +--- main/utils.c.orig 2016-11-23 15:26:01 UTC ++++ main/utils.c +@@ -2425,6 +2425,18 @@ char *ast_utils_which(const char *binary + return NULL; + } + ++int ast_check_ipv6(void) ++{ ++ int udp6_socket = socket(AF_INET6, SOCK_DGRAM, 0); ++ ++ if (udp6_socket < 0) { ++ return 0; ++ } ++ ++ close(udp6_socket); ++ return 1; ++} ++ + void DO_CRASH_NORETURN ast_do_crash(void) + { + #if defined(DO_CRASH) Added: head/net/asterisk13/files/patch-res_res__pjsip__sdp__rtp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/asterisk13/files/patch-res_res__pjsip__sdp__rtp.c Wed Nov 30 21:52:22 2016 (r427462) @@ -0,0 +1,23 @@ +--- res/res_pjsip_sdp_rtp.c.orig 2016-11-23 15:26:01 UTC ++++ res/res_pjsip_sdp_rtp.c +@@ -51,6 +51,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi + #include "asterisk/acl.h" + #include "asterisk/sdp_srtp.h" + #include "asterisk/dsp.h" ++#include "asterisk/utils.h" + + #include "asterisk/res_pjsip.h" + #include "asterisk/res_pjsip_session.h" +@@ -1493,7 +1494,11 @@ static int load_module(void) + { + CHECK_PJSIP_SESSION_MODULE_LOADED(); + +- ast_sockaddr_parse(&address_rtp, "::", 0); ++ if (ast_check_ipv6()) { ++ ast_sockaddr_parse(&address_rtp, "::", 0); ++ } else { ++ ast_sockaddr_parse(&address_rtp, "0.0.0.0", 0); ++ } + + if (!(sched = ast_sched_context_create())) { + ast_log(LOG_ERROR, "Unable to create scheduler context.\n"); Added: head/net/asterisk13/files/patch-res_res__pjsip__t38.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/asterisk13/files/patch-res_res__pjsip__t38.c Wed Nov 30 21:52:22 2016 (r427462) @@ -0,0 +1,23 @@ +--- res/res_pjsip_t38.c.orig 2016-11-23 15:26:01 UTC ++++ res/res_pjsip_t38.c +@@ -44,6 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi + #include "asterisk/netsock2.h" + #include "asterisk/channel.h" + #include "asterisk/acl.h" ++#include "asterisk/utils.h" + + #include "asterisk/res_pjsip.h" + #include "asterisk/res_pjsip_session.h" +@@ -918,7 +919,11 @@ static int load_module(void) + { + CHECK_PJSIP_SESSION_MODULE_LOADED(); + +- ast_sockaddr_parse(&address, "::", 0); ++ if (ast_check_ipv6()) { ++ ast_sockaddr_parse(&address, "::", 0); ++ } else { ++ ast_sockaddr_parse(&address, "0.0.0.0", 0); ++ } + + if (ast_sip_session_register_supplement(&t38_supplement)) { + ast_log(LOG_ERROR, "Unable to register T.38 session supplement\n");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611302152.uAULqMUE057118>