From owner-svn-ports-branches@freebsd.org Fri May 3 14:02:42 2019 Return-Path: Delivered-To: svn-ports-branches@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FF72159151D; Fri, 3 May 2019 14:02:42 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 05FE9729AD; Fri, 3 May 2019 14:02:42 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D288721C04; Fri, 3 May 2019 14:02:41 +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 x43E2fhQ059185; Fri, 3 May 2019 14:02:41 GMT (envelope-from madpilot@FreeBSD.org) Received: (from madpilot@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x43E2eJU059176; Fri, 3 May 2019 14:02:40 GMT (envelope-from madpilot@FreeBSD.org) Message-Id: <201905031402.x43E2eJU059176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: madpilot set sender to madpilot@FreeBSD.org using -f From: Guido Falsi Date: Fri, 3 May 2019 14:02:40 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r500733 - in branches/2019Q2/net: asterisk13 asterisk15 asterisk16 pjsip pjsip/files X-SVN-Group: ports-branches X-SVN-Commit-Author: madpilot X-SVN-Commit-Paths: in branches/2019Q2/net: asterisk13 asterisk15 asterisk16 pjsip pjsip/files X-SVN-Commit-Revision: 500733 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 05FE9729AD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 May 2019 14:02:42 -0000 Author: madpilot Date: Fri May 3 14:02:40 2019 New Revision: 500733 URL: https://svnweb.freebsd.org/changeset/ports/500733 Log: MFH: r500705 r500724 - Add to pjsip a customized config_site.h file with values suggested by the asterisk project. This allows WebRTC to work correctly in asterisk out of the box [1] - Also import some patches to pjsip from the asterisk project. These patches have already been integrated in upstream pjsip development sources [2] Reported by: zhenya1993lzn@yandex.ru [1] Obtained from: https://github.com/asterisk/asterisk/tree/16.3/third-party/pjproject/patches [2] Bump PORTREVISION on asterisk ports after r500705 changes to pjsip. Crashes have been reported, which are fixed by reinstallation. Reported by: Christoph Moench-Tegeder Approved by: ports-secteam (joneum, miwi) Added: branches/2019Q2/net/pjsip/files/config_site.h - copied unchanged from r500705, head/net/pjsip/files/config_site.h branches/2019Q2/net/pjsip/files/patch-0010-outgoing_connected_line_method_update - copied unchanged from r500705, head/net/pjsip/files/patch-0010-outgoing_connected_line_method_update branches/2019Q2/net/pjsip/files/patch-0020-Fixed-2172-Avoid-double-reference-counter-decrements - copied unchanged from r500705, head/net/pjsip/files/patch-0020-Fixed-2172-Avoid-double-reference-counter-decrements Modified: branches/2019Q2/net/asterisk13/Makefile branches/2019Q2/net/asterisk15/Makefile branches/2019Q2/net/asterisk16/Makefile branches/2019Q2/net/pjsip/Makefile Directory Properties: branches/2019Q2/ (props changed) Modified: branches/2019Q2/net/asterisk13/Makefile ============================================================================== --- branches/2019Q2/net/asterisk13/Makefile Fri May 3 13:58:33 2019 (r500732) +++ branches/2019Q2/net/asterisk13/Makefile Fri May 3 14:02:40 2019 (r500733) @@ -2,6 +2,7 @@ PORTNAME= asterisk PORTVERSION= 13.25.0 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= https://downloads.asterisk.org/pub/telephony/%SUBDIR%/:DEFAULT,g729 MASTER_SITE_SUBDIR= asterisk/ \ Modified: branches/2019Q2/net/asterisk15/Makefile ============================================================================== --- branches/2019Q2/net/asterisk15/Makefile Fri May 3 13:58:33 2019 (r500732) +++ branches/2019Q2/net/asterisk15/Makefile Fri May 3 14:02:40 2019 (r500733) @@ -2,6 +2,7 @@ PORTNAME= asterisk PORTVERSION= 15.7.2 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= https://downloads.asterisk.org/pub/telephony/%SUBDIR%/:DEFAULT,g729 MASTER_SITE_SUBDIR= asterisk/ \ Modified: branches/2019Q2/net/asterisk16/Makefile ============================================================================== --- branches/2019Q2/net/asterisk16/Makefile Fri May 3 13:58:33 2019 (r500732) +++ branches/2019Q2/net/asterisk16/Makefile Fri May 3 14:02:40 2019 (r500733) @@ -2,6 +2,7 @@ PORTNAME= asterisk PORTVERSION= 16.2.1 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= https://downloads.asterisk.org/pub/telephony/%SUBDIR%/:DEFAULT,g729 MASTER_SITE_SUBDIR= asterisk/ \ Modified: branches/2019Q2/net/pjsip/Makefile ============================================================================== --- branches/2019Q2/net/pjsip/Makefile Fri May 3 13:58:33 2019 (r500732) +++ branches/2019Q2/net/pjsip/Makefile Fri May 3 14:02:40 2019 (r500733) @@ -2,6 +2,7 @@ PORTNAME= pjsip PORTVERSION= 2.8 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.pjsip.org/release/${PORTVERSION}/ DISTNAME= pjproject-${DISTVERSION} @@ -96,8 +97,8 @@ post-patch: @${REINPLACE_CMD} -e 's/$$(APP_LDFLAGS) \{0,1\}//' \ -e 's/$$(OS_LDFLAGS)/$$(APP_LDFLAGS) &/' \ ${WRKSRC}/*/build/Makefile - @${ECHO} "#include " > ${WRKSRC}/pjlib/include/pj/config_site.h - @${ECHO} "#define PJ_IOQUEUE_MAX_HANDLES (FD_SETSIZE)" >> ${WRKSRC}/pjlib/include/pj/config_site.h + @${CP} ${FILESDIR}/config_site.h \ + ${WRKSRC}/pjlib/include/pj/config_site.h post-install-SHARED-on: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so Copied: branches/2019Q2/net/pjsip/files/config_site.h (from r500705, head/net/pjsip/files/config_site.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2019Q2/net/pjsip/files/config_site.h Fri May 3 14:02:40 2019 (r500733, copy of r500705, head/net/pjsip/files/config_site.h) @@ -0,0 +1,40 @@ +/* + * Custom options imported from asterisk provided customizations. + * + * $FreeBSD$ + */ + +#include + +#define PJ_MAX_HOSTNAME (256) +#define PJSIP_MAX_URL_SIZE (512) +#define PJ_IOQUEUE_MAX_HANDLES (FD_SETSIZE) + +#define PJ_SCANNER_USE_BITWISE 0 + +#define PJ_LOG_MAX_LEVEL 6 + +#define PJSIP_MAX_TSX_COUNT ((64*1024)-1) +#define PJSIP_MAX_DIALOG_COUNT ((64*1024)-1) +#define PJSIP_UDP_SO_SNDBUF_SIZE (512*1024) +#define PJSIP_UDP_SO_RCVBUF_SIZE (512*1024) + +#define PJSIP_MAX_PKT_LEN 32000 + +/* Defaults too low for WebRTC */ +#define PJ_ICE_MAX_CAND 32 +#define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * PJ_ICE_MAX_CAND) + +/* Increase limits to allow more formats */ +#define PJMEDIA_MAX_SDP_FMT 64 +#define PJMEDIA_MAX_SDP_BANDW 4 +#define PJMEDIA_MAX_SDP_ATTR (PJMEDIA_MAX_SDP_FMT*2 + 4) +#define PJMEDIA_MAX_SDP_MEDIA 16 + +/* + * Turn off the periodic sending of CRLNCRLN. Default is on (90 seconds), + * which conflicts with the global section's keep_alive_interval option in + * pjsip.conf in asterisk. + */ +#define PJSIP_TCP_KEEP_ALIVE_INTERVAL 0 +#define PJSIP_TLS_KEEP_ALIVE_INTERVAL 0 Copied: branches/2019Q2/net/pjsip/files/patch-0010-outgoing_connected_line_method_update (from r500705, head/net/pjsip/files/patch-0010-outgoing_connected_line_method_update) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2019Q2/net/pjsip/files/patch-0010-outgoing_connected_line_method_update Fri May 3 14:02:40 2019 (r500733, copy of r500705, head/net/pjsip/files/patch-0010-outgoing_connected_line_method_update) @@ -0,0 +1,33 @@ +diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c +--- pjsip/src/pjsip-ua/sip_inv.c ++++ pjsip/src/pjsip-ua/sip_inv.c +@@ -4185,6 +4185,29 @@ + + if (tsx->status_code != 100) { + ++ if (inv->role == PJSIP_ROLE_UAC) { ++ pjsip_rx_data *rdata = e->body.tsx_state.src.rdata; ++ pjsip_allow_hdr *allow = NULL; ++ pjsip_msg *msg = rdata->msg_info.msg; ++ ++ if (msg) { ++ allow = (pjsip_allow_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_ALLOW, ++ NULL); ++ } ++ if (allow) { ++ unsigned i; ++ const pj_str_t STR_UPDATE = { "UPDATE", 6 }; ++ ++ for (i=0; icount; ++i) { ++ if (pj_stricmp(&allow->values[i], &STR_UPDATE)==0) { ++ /* UPDATE is present in Allow */ ++ inv->options |= PJSIP_INV_SUPPORT_UPDATE; ++ break; ++ } ++ } ++ } ++ } ++ + if (dlg->remote.info->tag.slen) + inv_set_state(inv, PJSIP_INV_STATE_EARLY, e); + Copied: branches/2019Q2/net/pjsip/files/patch-0020-Fixed-2172-Avoid-double-reference-counter-decrements (from r500705, head/net/pjsip/files/patch-0020-Fixed-2172-Avoid-double-reference-counter-decrements) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2019Q2/net/pjsip/files/patch-0020-Fixed-2172-Avoid-double-reference-counter-decrements Fri May 3 14:02:40 2019 (r500733, copy of r500705, head/net/pjsip/files/patch-0020-Fixed-2172-Avoid-double-reference-counter-decrements) @@ -0,0 +1,42 @@ +From 1fed39fe1488abd654a5488b5e6ad59b4b973331 Mon Sep 17 00:00:00 2001 +From: nanang +Date: Tue, 8 Jan 2019 09:07:47 +0000 +Subject: [PATCH 1/5] Fixed #2172: Avoid double reference counter decrements in + timer in the scenario of race condition between pj_timer_heap_cancel() and + pj_timer_heap_poll(). + +--- + pjlib/src/pj/timer.c | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git a/pjlib/src/pj/timer.c b/pjlib/src/pj/timer.c +index 90a95e37b..7bae084ef 100644 +--- pjlib/src/pj/timer.c ++++ pjlib/src/pj/timer.c +@@ -580,13 +580,16 @@ static int cancel_timer(pj_timer_heap_t *ht, + + lock_timer_heap(ht); + count = cancel(ht, entry, flags | F_DONT_CALL); +- if (flags & F_SET_ID) { +- entry->id = id_val; +- } +- if (entry->_grp_lock) { +- pj_grp_lock_t *grp_lock = entry->_grp_lock; +- entry->_grp_lock = NULL; +- pj_grp_lock_dec_ref(grp_lock); ++ if (count > 0) { ++ /* Timer entry found & cancelled */ ++ if (flags & F_SET_ID) { ++ entry->id = id_val; ++ } ++ if (entry->_grp_lock) { ++ pj_grp_lock_t *grp_lock = entry->_grp_lock; ++ entry->_grp_lock = NULL; ++ pj_grp_lock_dec_ref(grp_lock); ++ } + } + unlock_timer_heap(ht); + +-- +2.20.1 +