From owner-svn-ports-all@freebsd.org Wed Nov 30 21:52:23 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE0BCC5E047; Wed, 30 Nov 2016 21:52:23 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EE8118BC; Wed, 30 Nov 2016 21:52:23 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAULqMph057123; Wed, 30 Nov 2016 21:52:22 GMT (envelope-from madpilot@FreeBSD.org) Received: (from madpilot@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAULqMUE057118; Wed, 30 Nov 2016 21:52:22 GMT (envelope-from madpilot@FreeBSD.org) Message-Id: <201611302152.uAULqMUE057118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: madpilot set sender to madpilot@FreeBSD.org using -f From: Guido Falsi Date: Wed, 30 Nov 2016 21:52:22 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r427462 - in head/net/asterisk13: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2016 21:52:23 -0000 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");