Import of pkgsrc-2016Q3

This commit is contained in:
2016-11-18 22:39:22 +01:00
committed by sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949747 additions and 377081 deletions
+5
View File
@@ -9,6 +9,11 @@ Interactive Voice Response, Call Queuing. It has support for
three-way calling, caller ID services, ADSI, SIP and H.323 (as both
client and gateway).
This is a long term support version. It is scheduled to go to
security fixes only on October 25th, 2016, and EOL on October 25th,
2017. See here for more information about Asterisk versions:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions
NOTE: This version does not work with the zaptel drivers. It
requires the newer DAHDI drivers which are still being ported.
So, there is no hardware support available at this moment.
+61 -35
View File
@@ -1,22 +1,24 @@
# $NetBSD: Makefile,v 1.127 2015/08/18 07:31:03 wiz Exp $
# $NetBSD: Makefile,v 1.141 2016/09/23 19:16:29 jnemeth Exp $
#
# NOTE: when updating this package, there are two places that sound
# tarballs need to be checked
# tarballs need to be checked; look win ${WRKSRC}/sounds/Makefile
# to find out the current sound file versions
DISTNAME= asterisk-11.19.0
DIST_SUBDIR= ${PKGNAME_NOREV}
DISTFILES= ${DEFAULT_DISTFILES}
EXTRACT_ONLY= ${DISTNAME}.tar.gz
PKGREVISION= 1
DISTNAME= asterisk-11.23.1
CATEGORIES= comms net audio
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \
http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ \
http://downloads.asterisk.org/pub/telephony/sounds/releases/
DIST_SUBDIR= ${PKGNAME_NOREV}
DISTFILES= ${DEFAULT_DISTFILES}
COMMENT= The Asterisk Software PBX
OWNER= jnemeth@NetBSD.org
HOMEPAGE= http://www.asterisk.org/
COMMENT= The Asterisk Software PBX
LICENSE= gnu-gpl-v2
EXTRACT_ONLY= ${DISTNAME}.tar.gz
MAKE_JOBS_SAFE= NO
# known to have issues on i386, block the package until the bug is fixed
@@ -38,8 +40,15 @@ CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --without-gtk2
# XXX remove when lang/lua gets builtin.mk
CONFIGURE_ARGS+= --without-lua
#JMN doesn't build properly on NetBSD, remove when -current is fixed
.if (${OPSYS} == "NetBSD" && \
(empty(OS_VERSION:M6.99.[4-9]?) && empty(OS_VERSION:M[7-9].*)))
CONFIGURE_ARGS+= --without-srtp
.else
CONFIGURE_ARGS+= --with-srtp
PLIST.srtp= YES
.include "../../comms/srtp/buildlink3.mk"
.endif
INSTALL_TARGET= install samples
INSTALLATION_DIRS+= lib/pkgconfig share/doc/${PKGBASE}
@@ -48,17 +57,17 @@ INSTALLATION_DIRS+= ${ASTDATADIR}/sounds/en ${ASTDATADIR}/moh
BUILD_DEFS+= VARBASE
ASTERISK_USER?= asterisk
ASTERISK_GROUP?= asterisk
PKG_GROUPS= ${ASTERISK_GROUP}
PKG_USERS= ${ASTERISK_USER}:${ASTERISK_GROUP}
ASTERISK_USER?= asterisk
ASTERISK_GROUP?= asterisk
PKG_GROUPS= ${ASTERISK_GROUP}
PKG_USERS= ${ASTERISK_USER}:${ASTERISK_GROUP}
PKG_GECOS.${ASTERISK_USER}= Asterisk PBX
PKG_GROUPS_VARS= ASTERISK_GROUP
PKG_USERS_VARS= ASTERISK_USER
FILES_SUBST+= ASTERISK_USER=${ASTERISK_USER}
FILES_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
MESSAGE_SUBST+= ASTERISK_USER=${ASTERISK_USER}
MESSAGE_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
PKG_GROUPS_VARS= ASTERISK_GROUP
PKG_USERS_VARS= ASTERISK_USER
FILES_SUBST+= ASTERISK_USER=${ASTERISK_USER}
FILES_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
MESSAGE_SUBST+= ASTERISK_USER=${ASTERISK_USER}
MESSAGE_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
# Various path settings for Asterisk
PKG_SYSCONFSUBDIR= asterisk
@@ -101,22 +110,28 @@ BUILDLINK_TRANSFORM+= rm:-march=i386
.endif
PLIST_VARS+= kqueue
.if exists(/usr/include/sys/event.h)
.for dir in ${COMPILER_INCLUDE_DIRS}
. if exists(${dir}/sys/event.h)
PLIST.kqueue= yes
.endif
. endif
.endfor
PLIST_VARS+= mgcp
# NOSIGPIPE is a temp variable, since PLIST.mgcp MUST remain undefined
# if the grep fails
NOSIGPIPE!= ${GREP} SO_NOSIGPIPE /usr/include/sys/socket.h || echo ""
.if ${NOSIGPIPE} != ""
PLIST.mgcp= yes
.endif
.for dir in ${COMPILER_INCLUDE_DIRS}
. if (exists(${dir}/sys/socket.h))
NOSIGPIPE!= ${GREP} SO_NOSIGPIPE ${dir}/sys/socket.h || echo ""
. if ${NOSIGPIPE} != ""
PLIST.mgcp= yes
. endif
. endif
.endfor
.include "options.mk"
# check sounds/Makefile for current version when upgrading package
DISTFILES+= asterisk-extra-sounds-en-gsm-1.4.15.tar.gz
DISTFILES+= asterisk-extra-sounds-en-gsm-1.5.tar.gz
# Override default paths in config files
SUBST_CLASSES+= configs
@@ -137,19 +152,24 @@ SUBST_SED.configs+= -e "s|/usr/local/man|${ASTMANDIR}|"
SUBST_SED.configs+= -e "s|/usr/local|${PREFIX}|"
SUBST_SED.configs+= -e "s|/var|${VARBASE}|"
.if (${OPSYS} == "NetBSD")
# XXX gross hack, remove when atomics properly implemented
SUBST_CLASSES+= atomics
SUBST_CLASSES.NetBSD+= atomics
SUBST_STAGE.atomics= post-configure
SUBST_FILES.atomics= include/asterisk/autoconfig.h
SUBST_SED.atomics= -e "s|^\#define HAVE_GCC_ATOMICS 1|\#undef HAVE_GCC_ATOMICS|"
# XXX gross hack, IP_PKTINFO in NetBSD isn't compatible with anything else
SUBST_CLASSES+= pktinfo
SUBST_CLASSES.NetBSD+= pktinfo
SUBST_STAGE.pktinfo= post-configure
SUBST_FILES.pktinfo= include/asterisk/autoconfig.h
SUBST_SED.pktinfo= -e "s|^\#define HAVE_PKTINFO 1|\#undef HAVE_PKTINFO|"
.endif
# XXX gross hack, gethostbyname_r on NETBSD is for internal use only
SUBST_CLASSES.NetBSD+= gethostbyname_r
SUBST_STAGE.gethostbyname_r= post-configure
SUBST_FILES.gethostbyname_r= include/asterisk/autoconfig.h
SUBST_SED.gethostbyname_r= -e "s|^\#define HAVE_GETHOSTBYNAME_R_5 1|\#undef HAVE_GETHOSTBYNAME_R_5|"
SUBST_SED.gethostbyname_r+= -e "s|^\#define HAVE_GETHOSTBYNAME_R_6 1|\#undef HAVE_GETHOSTBYNAME_R_6|"
RCD_SCRIPTS= asterisk
OWN_DIRS_PERMS+= ${ASTDBDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
@@ -178,8 +198,9 @@ CONF_FILES_PERMS= # empty
CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
.endfor
.if !empty(PKG_OPTIONS:Masterisk-config)
# if we put all the files in $CONF_FILES, the message is _way_ too long.
.for f in acl.conf adsi.conf agents.conf alarmreceiver.conf alsa.conf \
. for f in acl.conf adsi.conf agents.conf alarmreceiver.conf alsa.conf \
amd.conf app_mysql.conf asterisk.adsi calendar.conf ccss.conf \
cdr.conf cdr_adaptive_odbc.conf cdr_custom.conf \
cdr_manager.conf cdr_mysql.conf cdr_odbc.conf cdr_pgsql.conf \
@@ -204,20 +225,25 @@ CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_U
smdi.conf telcordia-1.adsi udptl.conf unistim.conf users.conf \
voicemail.conf vpb.conf xmpp.conf
CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
.endfor
. endfor
.endif
PTHREAD_OPTS+= require native
.if (${OPSYS} == "Darwin" && exists(/usr/include/sys/poll.h))
post-patch:
.if ${OPSYS} == "Darwin"
. for dir in ${COMPILER_INCLUDE_DIRS}
. if exists(${dir}/sys/poll.h)
${ECHO} "#include <sys/poll.h>" > ${WRKSRC}/include/asterisk/poll-compat.h
. endif
. endfor
.endif
post-install:
# check sounds directory for current versions when upgrading package
${TAR} xzf ${WRKSRC}/sounds/asterisk-core-sounds-en-gsm-1.4.27.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
${TAR} xzf ${WRKSRC}/sounds/asterisk-core-sounds-en-gsm-1.5.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
${TAR} xzf ${WRKSRC}/sounds/asterisk-moh-opsound-wav-2.03.tar.gz -C ${DESTDIR}${ASTDATADIR}/moh
${TAR} xzf ${DISTDIR}/${DIST_SUBDIR}/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
${TAR} xzf ${DISTDIR}/${DIST_SUBDIR}/asterisk-extra-sounds-en-gsm-1.5.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
${INSTALL_DATA} ${WRKSRC}/BUGS ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/CHANGES ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/COPYING ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
+10 -10
View File
@@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.10 2015/08/09 04:07:13 jnemeth Exp $
@comment $NetBSD: PLIST,v 1.12 2016/05/05 02:00:33 jnemeth Exp $
include/asterisk.h
include/asterisk/_private.h
include/asterisk/abstract_jb.h
@@ -356,6 +356,7 @@ lib/asterisk/modules/res_security_log.so
lib/asterisk/modules/res_smdi.so
${PLIST.snmp}lib/asterisk/modules/res_snmp.so
lib/asterisk/modules/res_speech.so
${PLIST.srtp}lib/asterisk/modules/res_srtp.so
lib/asterisk/modules/res_stun_monitor.so
${PLIST.kqueue}lib/asterisk/modules/res_timing_kqueue.so
lib/asterisk/modules/res_timing_pthread.so
@@ -382,15 +383,15 @@ libdata/asterisk/phoneprov/000000000000.cfg
libdata/asterisk/phoneprov/polycom.xml
libdata/asterisk/phoneprov/polycom_line.xml
libdata/asterisk/phoneprov/snom-mac.xml
libdata/asterisk/sounds/en/.asterisk-core-sounds-en-gsm-1.4.27
libdata/asterisk/sounds/en/.asterisk-core-sounds-en-gsm-1.5
libdata/asterisk/sounds/en/1-for-am-2-for-pm.gsm
libdata/asterisk/sounds/en/1-yes-2-no.gsm
libdata/asterisk/sounds/en/CHANGES-asterisk-core-en-1.4.27
libdata/asterisk/sounds/en/CHANGES-asterisk-extra-en-1.4.15
libdata/asterisk/sounds/en/CREDITS-asterisk-core-en-1.4.27
libdata/asterisk/sounds/en/CREDITS-asterisk-extra-en-1.4.15
libdata/asterisk/sounds/en/LICENSE-asterisk-core-en-1.4.27
libdata/asterisk/sounds/en/LICENSE-asterisk-extra-en-1.4.15
libdata/asterisk/sounds/en/CHANGES-asterisk-core-en-1.5
libdata/asterisk/sounds/en/CHANGES-asterisk-extra-en-1.5
libdata/asterisk/sounds/en/CREDITS-asterisk-core-en-1.5
libdata/asterisk/sounds/en/CREDITS-asterisk-extra-en-1.5
libdata/asterisk/sounds/en/LICENSE-asterisk-core-en-1.5
libdata/asterisk/sounds/en/LICENSE-asterisk-extra-en-1.5
libdata/asterisk/sounds/en/OfficeSpace.gsm
libdata/asterisk/sounds/en/Randulo-allison.gsm
libdata/asterisk/sounds/en/SIP_Test_Failure.gsm
@@ -468,7 +469,6 @@ libdata/asterisk/sounds/en/astcc-account-number-invalid.gsm
libdata/asterisk/sounds/en/astcc-balance-of-account-is.gsm
libdata/asterisk/sounds/en/astcc-card-number-invalid.gsm
libdata/asterisk/sounds/en/astcc-digit-account-number.gsm
libdata/asterisk/sounds/en/astcc-followed-by-pound.gsm
libdata/asterisk/sounds/en/astcc-followed-by-the-hash-key.gsm
libdata/asterisk/sounds/en/astcc-followed-by-the-pound-key.gsm
libdata/asterisk/sounds/en/astcc-login12pound.gsm
@@ -1604,6 +1604,7 @@ libdata/asterisk/sounds/en/please-hold-minion-connect.gsm
libdata/asterisk/sounds/en/please-hold-while-minion.gsm
libdata/asterisk/sounds/en/please-try-again-later.gsm
libdata/asterisk/sounds/en/please-try-again.gsm
libdata/asterisk/sounds/en/please-try-call-later.gsm
libdata/asterisk/sounds/en/please-try.gsm
libdata/asterisk/sounds/en/please-wait-connect-oncall-eng.gsm
libdata/asterisk/sounds/en/pls-ent-num-transfer.gsm
@@ -1620,7 +1621,6 @@ libdata/asterisk/sounds/en/pls-rcrd-name-at-tone.gsm
libdata/asterisk/sounds/en/pls-stay-on-line.gsm
libdata/asterisk/sounds/en/pls-try-again.gsm
libdata/asterisk/sounds/en/pls-try-area-code.gsm
libdata/asterisk/sounds/en/pls-try-call-later.gsm
libdata/asterisk/sounds/en/pls-try-manually.gsm
libdata/asterisk/sounds/en/pls-wait-connect-call.gsm
libdata/asterisk/sounds/en/plugh.gsm
+29 -15
View File
@@ -1,11 +1,13 @@
$NetBSD: distinfo,v 1.74 2015/08/09 04:07:13 jnemeth Exp $
$NetBSD: distinfo,v 1.80 2016/09/23 19:16:29 jnemeth Exp $
SHA1 (asterisk-11.19.0/asterisk-11.19.0.tar.gz) = e35b9d910cb549b0bea20dbad60760f230bd3881
RMD160 (asterisk-11.19.0/asterisk-11.19.0.tar.gz) = 1dca1ddf50233b57f8f1edcaace76ccd56ca2e7e
Size (asterisk-11.19.0/asterisk-11.19.0.tar.gz) = 34852510 bytes
SHA1 (asterisk-11.19.0/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = fbb94494e31fc08eee8fdf2ce7d12eb274018050
RMD160 (asterisk-11.19.0/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = 53656a3d6771602504f220ad312093e3503e1150
Size (asterisk-11.19.0/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = 4409969 bytes
SHA1 (asterisk-11.23.1/asterisk-11.23.1.tar.gz) = cae7aa5a7e1515928a255f5bd3715f67c13285d3
RMD160 (asterisk-11.23.1/asterisk-11.23.1.tar.gz) = e789fc326db6771e3a865516241dbc47ecb73fd7
SHA512 (asterisk-11.23.1/asterisk-11.23.1.tar.gz) = 6d067ea86a7c050b19e29d6ea25aefd23c3f32bb7d334f4e3c74bcaedaf21e4faeeab71b4fd260fc39f3e12f645c3bf89737f4c2d16f988cc66f93d4e47f80a7
Size (asterisk-11.23.1/asterisk-11.23.1.tar.gz) = 35098451 bytes
SHA1 (asterisk-11.23.1/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = 831ae6442e23cbef1e7d1c84798778ad0b0524d1
RMD160 (asterisk-11.23.1/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = d52df795201c53fc4cd7d99ed41516e312f6f0f3
SHA512 (asterisk-11.23.1/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = c7d3c3fd2c854e6776801312d34bf69bbed78a443c16121637f508c5275f18b1d415cbb6e4f6f8c5aa3769cbbfa1a11485b9972053777f3ac39256c2c81729f1
Size (asterisk-11.23.1/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = 4256538 bytes
SHA1 (patch-Makefile) = 5fd774779d3c8d85936beca8a3407dd3011af2dc
SHA1 (patch-addons_chan__ooh323.c) = 57f61a2edf0f9f022e03837230ee572ec9cf47b4
SHA1 (patch-apps_app__confbridge.c) = c815905994355a19c32e8e3e2eb5dc9f1679eb29
@@ -14,7 +16,7 @@ SHA1 (patch-apps_app__dumpchan.c) = f5a5cc776c99875d1c58e60953fb3f4cec27a94f
SHA1 (patch-apps_app__followme.c) = 0b362486e1759099b61d42a9880109c5743fa0bc
SHA1 (patch-apps_app__meetme.c) = 3927b77fac1cd69f58df4e2ec783359ed0135dad
SHA1 (patch-apps_app__osplookup.c) = 692776511b6a970d29db5fdef9d68af2a3ef6e35
SHA1 (patch-apps_app__queue.c) = c0f477c45c18c1457386f1cbb6bbff74187fc3ca
SHA1 (patch-apps_app__queue.c) = ffed7ef3133d924ef7d176a4f30f369bdd245a42
SHA1 (patch-apps_app__skel.c) = e661a53b61d36343c54be7ad9ea6cde6cb10f180
SHA1 (patch-apps_app__sms.c) = d89b27a9df04d4da98d562241c07d25d182baefc
SHA1 (patch-apps_app__voicemail.c) = 692551a10f51729dd23aa304117eccfb3978c1c8
@@ -24,22 +26,27 @@ SHA1 (patch-cdr_cdr__pgsql.c) = b8c9a67b62bd0ce8dc373a7f5708fdf35f3be0aa
SHA1 (patch-cel_cel__pgsql.c) = f295eca04505d011c6548cdb29ddc292d4540714
SHA1 (patch-channels_chan__motif.c) = db6c97ba02a441633338d492032d78cd86f094f5
SHA1 (patch-channels_chan__oss.c) = 0be259a83c4425d08b693a54c43896da039df721
SHA1 (patch-channels_chan__sip.c) = e711bcb65336ed1803ed92989889258f1d416f6b
SHA1 (patch-configure) = 88619fe9072ff69ed8da0a1917ac3852d10998a4
SHA1 (patch-configure.ac) = 2fdae524cfc95f152b86a32405b80f6edae6fa20
SHA1 (patch-channels_chan__sip.c) = abde08da0038ae87401f682df9140ba0fb6e4557
SHA1 (patch-channels_sip_sdp__crypto.c) = decb6cfe0d6893db912a9087b2155c225db5e1e8
SHA1 (patch-codecs_codec__dahdi.c) = f412e1f60cb49076b8cabcd747c0f0168f1fa9e7
SHA1 (patch-configure) = 7138e0c99c17f01298787e504fa1594b5bdb8572
SHA1 (patch-configure.ac) = 4acdf055e402c810a7e40af9ab8d6afafee60764
SHA1 (patch-contrib_scripts_vmail.cgi) = 650b9bbf3e322d1ad351932cfe6f747baa8f35e4
SHA1 (patch-funcs_func__env.c) = 30ec2c804ea69c4825fe0a888f9e982c7418c528
SHA1 (patch-funcs_func__strings.c) = 4c1db693d845691492b77bbf489764d362de2087
SHA1 (patch-include_asterisk_autoconfig.h.in) = 09a8f8d5398612fdadba25f221b16c19429f81e2
SHA1 (patch-include_asterisk_endian.h) = 41c1a9a9e02fe394bc9261f5559e931b1378ea28
SHA1 (patch-include_asterisk_lock.h) = cb1404e56de4708836091c224df439158119764c
SHA1 (patch-include_asterisk_sha1.h) = ff5a0cdf3423cfa1b95e0215924a88db0d95331f
SHA1 (patch-include_asterisk_strings.h) = fc5987a98429ca470f7e9bdcf170d49b0c1f3407
SHA1 (patch-include_asterisk_utils.h) = 07e70fe0adf39cd9a7f94c735b9a3fa72ae3df89
SHA1 (patch-main_Makefile) = 5f9238a528d2b96777e17a4ac6d3e7876dfffb98
SHA1 (patch-main_acl.c) = 1eac532a15127c25981d2db9462a8ccce2c58620
SHA1 (patch-main_asterisk.c) = bfdbd5299b7279ef080a015a9a10627aa929dd49
SHA1 (patch-main_astmm.c) = 27ff06a6eae9396bde2babeff53d004202d0632a
SHA1 (patch-main_cdr.c) = 3d98a342bdbde81109cccd18943b48168768be77
SHA1 (patch-main_cdr.c) = ee96972504a2b4cb01129928e5fc35b7f1f99b9b
SHA1 (patch-main_cel.c) = 909ace2328c15cda2934dadac35889351be7c4f7
SHA1 (patch-main_channel.c) = f1218badff1354961b49c9e5f35ca2db7d1e4511
SHA1 (patch-main_config__options.c) = e49a946da99546684e8988ca4301bcacbb415987
SHA1 (patch-main_features.c) = 1c11207c60ce53c1101141e07ae04d0ddb838450
SHA1 (patch-main_format.c) = a6d446c3de883cf3ef768d03d39e8d8db068b750
@@ -48,21 +55,28 @@ SHA1 (patch-main_logger.c) = 3c64602c9453c157157f8a0c63056be30ede99c5
SHA1 (patch-main_manager.c) = 6700814350f6960ac7543f587ba6c27a443eeef2
SHA1 (patch-main_named__acl.c) = 48c23ed0e558299679bbfc9e564383f9f7dd181f
SHA1 (patch-main_netsock.c) = 015796266b9806425180c9bb05a1907116ef086d
SHA1 (patch-main_pbx.c) = a3151ae6c09ed69c588dc67cf39c862e10a15bf2
SHA1 (patch-main_sched.c) = 73759369470b575e73ca78f9cff096ebb477c9b1
SHA1 (patch-main_stdtime_localtime.c) = 4b01b34cc2a541487f744b3901c536419c95b394
SHA1 (patch-main_pbx.c) = 049e9883ebbb4e8b2c8913e9e8f310717f6c2168
SHA1 (patch-main_sched.c) = 4b554ff9444e58faa685ec6a2963206b77a00836
SHA1 (patch-main_stdtime_localtime.c) = afbdecc7fdf3b8ea3020a2282003b63d89adb0f3
SHA1 (patch-main_test.c) = 3f239ed7611facbd937057f056ebc7495403dbaf
SHA1 (patch-main_udptl.c) = 260586e4203b4bf51737ba171cbfe57621de8728
SHA1 (patch-main_utils.c) = df8bfd592f82b9b5c2c95a6860d2dca7003f66ca
SHA1 (patch-pbx_pbx__dundi.c) = 4dbcbbae3cbace91c8ed87e3e10cad0a1eb45e75
SHA1 (patch-res_Makefile) = 2b3fa69b155a88e9026005fa6d89f651541bde8a
SHA1 (patch-res_ael_pval.c) = cd8dcb8d82a100c406c397364b0cd5e3655bb06a
SHA1 (patch-res_pjproject_aconfigure) = 0095894c5daac2dec6a9ec745c0ecb8d46c0b73a
SHA1 (patch-res_pjproject_aconfigure.ac) = cbabe4a5f1888e180c93404324ddb96728dc20b9
SHA1 (patch-res_pjproject_build.symbian_makedef.sh) = 37781fe307564ad827e9be67f507f84230ebf299
SHA1 (patch-res_pjproject_pjlib_include_pj_config.h) = 699ff47d099530030b94803fe83c16a3a177d6c1
SHA1 (patch-res_pjproject_pjlib_include_pj_sock__select.h) = 60d0745710ddb7669f45a2ffcc6329ab3bfd5d28
SHA1 (patch-res_pjproject_pjlib_src_pj_sock__select.c) = defc9c86574d295175bad2d5826b01291116a2cd
SHA1 (patch-res_pjproject_third__party_portaudio_src_hostapi_alsa_pa__linux__alsa.c) = 75da38cbe5fd8c4bbb0c1e0825a78c89e29be138
SHA1 (patch-res_pjproject_third__party_portaudio_src_hostapi_oss_pa__unix__oss.c) = 5f3ccac5939b01cf6957b7072bc9ad4679f63e5c
SHA1 (patch-res_res__calendar.c) = a4c491d8c77f88d0834d0eb52622f7c6e4f3428b
SHA1 (patch-res_res__calendar__caldav.c) = 673e8a256fc748338f35c7deddbf283809d19904
SHA1 (patch-res_res__calendar__icalendar.c) = 3258522abbdc5c0cfe76868f73f16931118983e5
SHA1 (patch-res_res__config__pgsql.c) = 719fa8939ca0e6cae256dd1b19a11405f475a620
SHA1 (patch-res_res__timing__kqueue.c) = 36dba3fb1081bccc872145a4d9601e179ac2981a
SHA1 (patch-res_res__xmpp.c) = 25ce66a0536a290598b4c11f14c7ab94f6577af5
SHA1 (patch-sounds_Makefile) = 792c2e25e1c8334fe8c9038b8b630376a5894c31
SHA1 (patch-tests_test__abstract__jb.c) = 42cfa303fc2e399aa9fe3bebf51464d0776e171c
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="export">
<service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
<create_default_instance enabled="false" />
<single_instance />
<dependency name='network' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/milestone/network:default' />
</dependency>
<dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<method_context>
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/asterisk" timeout_seconds="60" />
<exec_method type="method" name="stop" exec="@PREFIX@/sbin/asterisk -nr -x 'core stop gracefully' >/dev/null" timeout_seconds="60" />
<exec_method type="method" name="refresh" exec="@PREFIX@/sbin/asterisk -nr -x 'core reload' >/dev/null" timeout_seconds="60" />
<property_group name="startd" type="framework">
<propval name="duration" type="astring" value="contract" />
<propval name="ignore_error" type="astring" value="core,signal" />
</property_group>
<property_group name="application" type="application">
<propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/asterisk.conf" />
</property_group>
<template>
<common_name>
<loctext xml:lang="C">Asterisk PBX</loctext>
</common_name>
</template>
</service>
</service_bundle>
+4 -4
View File
@@ -1,15 +1,15 @@
# $NetBSD: options.mk,v 1.7 2015/08/09 04:07:13 jnemeth Exp $
# $NetBSD: options.mk,v 1.8 2015/10/27 08:49:01 jnemeth Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.asterisk
PKG_SUPPORTED_OPTIONS= zaptel x11 unixodbc ilbc webvmail ldap spandsp
PKG_SUPPORTED_OPTIONS+= jabber speex snmp pgsql
PKG_SUPPORTED_OPTIONS+= jabber speex snmp pgsql asterisk-config
PKG_OPTIONS_LEGACY_OPTS+= gtk:x11
PKG_SUGGESTED_OPTIONS= ldap jabber speex
PKG_SUGGESTED_OPTIONS= ldap jabber speex asterisk-config
.include "../../mk/bsd.options.mk"
PLIST_VARS+= zaptel x11 unixodbc webvmail ldap spandsp jabber
PLIST_VARS+= speex snmp pgsql
PLIST_VARS+= speex snmp pgsql srtp
# Asterisk now uses DAHDI, not zaptel; not implemented yet...
#.if !empty(PKG_OPTIONS:Mzaptel)
+94 -42
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
$NetBSD: patch-apps_app__queue.c,v 1.6 2016/05/05 02:00:33 jnemeth Exp $
--- apps/app_queue.c.orig 2015-03-22 23:55:25.000000000 +0000
--- apps/app_queue.c.orig 2016-03-29 19:25:17.000000000 +0000
+++ apps/app_queue.c
@@ -4043,8 +4043,8 @@ static void record_abandoned(struct queu
@@ -4075,8 +4075,8 @@ static void record_abandoned(struct queu
"Uniqueid: %s\r\n"
"Position: %d\r\n"
"OriginalPosition: %d\r\n"
@@ -13,7 +13,81 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
qe->parent->callsabandoned++;
ao2_unlock(qe->parent);
@@ -4816,7 +4816,7 @@ static int wait_our_turn(struct queue_en
@@ -4196,8 +4196,8 @@ static struct callattempt *wait_for_answ
struct ast_channel *in = qe->chan;
char on[80] = "";
char membername[80] = "";
- long starttime = 0;
- long endtime = 0;
+ time_t starttime = 0;
+ time_t endtime = 0;
#ifdef HAVE_EPOLL
struct callattempt *epollo;
#endif
@@ -4211,7 +4211,7 @@ static struct callattempt *wait_for_answ
inchan_name = ast_strdupa(ast_channel_name(qe->chan));
ast_channel_unlock(qe->chan);
- starttime = (long) time(NULL);
+ starttime = time(NULL);
#ifdef HAVE_EPOLL
for (epollo = outgoing; epollo; epollo = epollo->q_next) {
if (epollo->chan) {
@@ -4482,7 +4482,7 @@ static struct callattempt *wait_for_answ
ast_cdr_busy(ast_channel_cdr(in));
}
do_hang(o);
- endtime = (long) time(NULL);
+ endtime = time(NULL);
endtime -= starttime;
rna(endtime * 1000, qe, on, membername, qe->parent->autopausebusy);
if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
@@ -4492,7 +4492,7 @@ static struct callattempt *wait_for_answ
/* Have enough time for a queue member to answer? */
if (ast_remaining_ms(start_time_tv, orig) > 500) {
ring_one(qe, outgoing, &numbusies);
- starttime = (long) time(NULL);
+ starttime = time(NULL);
}
}
numbusies++;
@@ -4502,7 +4502,7 @@ static struct callattempt *wait_for_answ
if (ast_channel_cdr(in)) {
ast_cdr_busy(ast_channel_cdr(in));
}
- endtime = (long) time(NULL);
+ endtime = time(NULL);
endtime -= starttime;
rna(endtime * 1000, qe, on, membername, qe->parent->autopauseunavail);
do_hang(o);
@@ -4512,7 +4512,7 @@ static struct callattempt *wait_for_answ
}
if (ast_remaining_ms(start_time_tv, orig) > 500) {
ring_one(qe, outgoing, &numbusies);
- starttime = (long) time(NULL);
+ starttime = time(NULL);
}
}
numbusies++;
@@ -4598,7 +4598,7 @@ static struct callattempt *wait_for_answ
}
ast_frfree(f);
} else { /* ast_read() returned NULL */
- endtime = (long) time(NULL) - starttime;
+ endtime = time(NULL) - starttime;
rna(endtime * 1000, qe, on, membername, 1);
do_hang(o);
if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
@@ -4607,7 +4607,7 @@ static struct callattempt *wait_for_answ
}
if (ast_remaining_ms(start_time_tv, orig) > 500) {
ring_one(qe, outgoing, &numbusies);
- starttime = (long) time(NULL);
+ starttime = time(NULL);
}
}
}
@@ -4853,7 +4853,7 @@ static int wait_our_turn(struct queue_en
if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->parent->leavewhenempty, 0))) {
*reason = QUEUE_LEAVEEMPTY;
@@ -22,7 +96,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
leave_queue(qe);
break;
}
@@ -5056,12 +5056,12 @@ static void send_agent_complete(const st
@@ -5103,12 +5103,12 @@ static void send_agent_complete(const st
"Channel: %s\r\n"
"Member: %s\r\n"
"MemberName: %s\r\n"
@@ -38,7 +112,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, vars_len) : "");
}
@@ -5104,9 +5104,9 @@ static void queue_transfer_fixup(void *d
@@ -5151,9 +5151,9 @@ static void queue_transfer_fixup(void *d
int callcompletedinsl = qtds->callcompletedinsl;
struct ast_datastore *datastore;
@@ -51,7 +125,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
update_queue(qe->parent, member, callcompletedinsl, (time(NULL) - callstart));
@@ -5624,7 +5624,7 @@ static int try_calling(struct queue_ent
@@ -5674,7 +5674,7 @@ static int try_calling(struct queue_ent
} else if (ast_check_hangup(qe->chan)) {
/* Caller must have hung up just before being connected */
ast_log(LOG_NOTICE, "Caller was about to talk to agent on %s but the caller hungup.\n", ast_channel_name(peer));
@@ -60,7 +134,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
record_abandoned(qe);
ast_autoservice_chan_hangup_peer(qe->chan, peer);
ao2_ref(member, -1);
@@ -5664,8 +5664,8 @@ static int try_calling(struct queue_ent
@@ -5714,8 +5714,8 @@ static int try_calling(struct queue_ent
/* if setinterfacevar is defined, make member variables available to the channel */
/* use pbx_builtin_setvar to set a load of variables with one call */
if (qe->parent->setinterfacevar) {
@@ -71,7 +145,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
pbx_builtin_setvar_multiple(qe->chan, interfacevar);
pbx_builtin_setvar_multiple(peer, interfacevar);
}
@@ -5673,8 +5673,8 @@ static int try_calling(struct queue_ent
@@ -5723,8 +5723,8 @@ static int try_calling(struct queue_ent
/* if setqueueentryvar is defined, make queue entry (i.e. the caller) variables available to the channel */
/* use pbx_builtin_setvar to set a load of variables with one call */
if (qe->parent->setqueueentryvar) {
@@ -82,18 +156,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
pbx_builtin_setvar_multiple(qe->chan, interfacevar);
pbx_builtin_setvar_multiple(peer, interfacevar);
}
@@ -5891,8 +5891,8 @@ static int try_calling(struct queue_ent
}
}
qe->handled++;
- ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "CONNECT", "%ld|%s|%ld", (long) (time(NULL) - qe->start), ast_channel_uniqueid(peer),
- (long)(orig - to > 0 ? (orig - to) / 1000 : 0));
+ ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "CONNECT", "%jd|%s|%jd", (intmax_t) (time(NULL) - qe->start), ast_channel_uniqueid(peer),
+ (intmax_t)(orig - to > 0 ? (orig - to) / 1000 : 0));
if (ast_channel_cdr(qe->chan)) {
struct ast_cdr *cdr;
@@ -5946,12 +5946,12 @@ static int try_calling(struct queue_ent
@@ -6018,12 +6018,12 @@ static int try_calling(struct queue_ent
"Channel: %s\r\n"
"Member: %s\r\n"
"MemberName: %s\r\n"
@@ -109,7 +172,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
ast_copy_string(oldcontext, ast_channel_context(qe->chan), sizeof(oldcontext));
ast_copy_string(oldexten, ast_channel_exten(qe->chan), sizeof(oldexten));
@@ -5983,17 +5983,17 @@ static int try_calling(struct queue_ent
@@ -6055,17 +6055,17 @@ static int try_calling(struct queue_ent
/* detect a blind transfer */
if (!(ast_channel_softhangup_internal_flag(qe->chan) | ast_channel_softhangup_internal_flag(peer)) && (strcasecmp(oldcontext, ast_channel_context(qe->chan)) || strcasecmp(oldexten, ast_channel_exten(qe->chan)))) {
@@ -134,7 +197,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), AGENT);
}
if ((tds = ast_channel_datastore_find(qe->chan, &queue_transfer_info, NULL))) {
@@ -7126,8 +7126,8 @@ static int queue_exec(struct ast_channel
@@ -7234,8 +7234,8 @@ static int queue_exec(struct ast_channel
}
}
@@ -145,7 +208,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
qe.chan = chan;
qe.prio = prio;
@@ -7177,8 +7177,8 @@ check_turns:
@@ -7285,8 +7285,8 @@ check_turns:
record_abandoned(&qe);
reason = QUEUE_TIMEOUT;
res = 0;
@@ -156,7 +219,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
break;
}
@@ -7222,7 +7222,7 @@ check_turns:
@@ -7331,7 +7331,7 @@ check_turns:
if ((status = get_member_status(qe.parent, qe.max_penalty, qe.min_penalty, qe.parent->leavewhenempty, 0))) {
record_abandoned(&qe);
reason = QUEUE_LEAVEEMPTY;
@@ -165,7 +228,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
res = 0;
break;
}
@@ -7244,7 +7244,7 @@ check_turns:
@@ -7354,7 +7354,7 @@ check_turns:
record_abandoned(&qe);
reason = QUEUE_TIMEOUT;
res = 0;
@@ -174,7 +237,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
break;
}
@@ -7272,8 +7272,8 @@ stop:
@@ -7382,8 +7382,8 @@ stop:
if (!qe.handled) {
record_abandoned(&qe);
ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "ABANDON",
@@ -185,7 +248,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
res = -1;
} else if (qcontinue) {
reason = QUEUE_CONTINUE;
@@ -7281,7 +7281,7 @@ stop:
@@ -7391,7 +7391,7 @@ stop:
}
} else if (qe.valid_digits) {
ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITWITHKEY",
@@ -194,18 +257,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
}
}
@@ -8404,8 +8404,8 @@ static char *__queues_show(struct manses
mem->paused ? " (paused)" : "",
ast_devstate2str(mem->status));
if (mem->calls) {
- ast_str_append(&out, 0, " has taken %d calls (last was %ld secs ago)",
- mem->calls, (long) (time(NULL) - mem->lastcall));
+ ast_str_append(&out, 0, " has taken %d calls (last was %jd secs ago)",
+ mem->calls, (intmax_t) (time(NULL) - mem->lastcall));
} else {
ast_str_append(&out, 0, " has taken no calls yet");
}
@@ -8422,9 +8422,9 @@ static char *__queues_show(struct manses
@@ -8538,9 +8538,9 @@ static char *__queues_show(struct manses
do_print(s, fd, " Callers: ");
for (qe = q->head; qe; qe = qe->next) {
@@ -218,7 +270,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
do_print(s, fd, ast_str_buffer(out));
}
}
@@ -8782,7 +8782,7 @@ static int manager_queues_status(struct
@@ -8900,7 +8900,7 @@ static int manager_queues_status(struct
"CallerIDName: %s\r\n"
"ConnectedLineNum: %s\r\n"
"ConnectedLineName: %s\r\n"
@@ -227,7 +279,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
"%s"
"\r\n",
q->name, pos++, ast_channel_name(qe->chan), ast_channel_uniqueid(qe->chan),
@@ -8790,7 +8790,7 @@ static int manager_queues_status(struct
@@ -8908,7 +8908,7 @@ static int manager_queues_status(struct
S_COR(ast_channel_caller(qe->chan)->id.name.valid, ast_channel_caller(qe->chan)->id.name.str, "unknown"),
S_COR(ast_channel_connected(qe->chan)->id.number.valid, ast_channel_connected(qe->chan)->id.number.str, "unknown"),
S_COR(ast_channel_connected(qe->chan)->id.name.valid, ast_channel_connected(qe->chan)->id.name.str, "unknown"),
@@ -1,8 +1,8 @@
$NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
$NetBSD: patch-channels_chan__sip.c,v 1.3 2016/02/07 08:18:43 jnemeth Exp $
--- channels/chan_sip.c.orig 2015-03-19 09:39:28.000000000 +0000
--- channels/chan_sip.c.orig 2016-02-03 21:23:32.000000000 +0000
+++ channels/chan_sip.c
@@ -17515,6 +17515,8 @@ static int get_rdnis(struct sip_pvt *p,
@@ -17571,6 +17571,8 @@ static int get_rdnis(struct sip_pvt *p,
return 0;
}
@@ -11,7 +11,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
/*!
* \brief Find out who the call is for.
*
@@ -17532,7 +17534,7 @@ static int get_rdnis(struct sip_pvt *p,
@@ -17588,7 +17590,7 @@ static int get_rdnis(struct sip_pvt *p,
static enum sip_get_dest_result get_destination(struct sip_pvt *p, struct sip_request *oreq, int *cc_recall_core_id)
{
char tmp[256] = "", *uri, *unused_password, *domain;
@@ -20,7 +20,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
char *from = NULL;
struct sip_request *req;
char *decoded_uri;
@@ -18405,6 +18407,8 @@ static enum check_auth_result check_peer
@@ -18467,6 +18469,8 @@ static enum check_auth_result check_peer
return res;
}
@@ -29,7 +29,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
/*! \brief Check if matching user or peer is defined
Match user on From: user name and peer on IP/port
@@ -18416,8 +18420,8 @@ static enum check_auth_result check_user
@@ -18478,8 +18482,8 @@ static enum check_auth_result check_user
struct ast_sockaddr *addr, struct sip_peer **authpeer)
{
char *of, *name, *unused_password, *domain;
@@ -40,7 +40,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
enum check_auth_result res = AUTH_DONT_KNOW;
char calleridname[256];
char *uri2 = ast_strdupa(uri);
@@ -19054,7 +19058,7 @@ static int manager_show_registry(struct
@@ -19116,7 +19120,7 @@ static int manager_show_registry(struct
"DomainPort: %d\r\n"
"Refresh: %d\r\n"
"State: %s\r\n"
@@ -49,7 +49,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
"\r\n",
idtext,
iterator->hostname,
@@ -19064,7 +19068,7 @@ static int manager_show_registry(struct
@@ -19126,7 +19130,7 @@ static int manager_show_registry(struct
iterator->regdomainport ? iterator->regdomainport : STANDARD_SIP_PORT,
iterator->refresh,
regstate2str(iterator->regstate),
@@ -58,7 +58,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
ASTOBJ_UNLOCK(iterator);
total++;
} while(0));
@@ -29112,8 +29116,8 @@ static int check_rtp_timeout(struct sip_
@@ -29237,8 +29241,8 @@ static int check_rtp_timeout(struct sip_
*/
return 0;
}
@@ -68,4 +68,4 @@ $NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
+ ast_channel_name(dialog->owner), (intmax_t) (t - dialog->lastrtprx));
manager_event(EVENT_FLAG_CALL, "SessionTimeout", "Source: RTPTimeout\r\n"
"Channel: %s\r\nUniqueid: %s\r\n", ast_channel_name(dialog->owner), ast_channel_uniqueid(dialog->owner));
/* Issue a softhangup */
/* Issue a softhangup - cause 44 (as used by Cisco for RTP timeouts) */
@@ -0,0 +1,25 @@
$NetBSD: patch-channels_sip_sdp__crypto.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- channels/sip/sdp_crypto.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ channels/sip/sdp_crypto.c
@@ -187,6 +187,7 @@ err:
int sdp_crypto_process(struct sdp_crypto *p, const char *attr, struct ast_rtp_instance *rtp, struct sip_srtp *srtp)
{
+ char buf[10];
char *str = NULL;
char *tag = NULL;
char *suite = NULL;
@@ -220,8 +221,10 @@ int sdp_crypto_process(struct sdp_crypto
return -1;
}
- /* RFC4568 9.1 - tag is 1-9 digits, greater than zero */
- if (sscanf(tag, "%30d", &p->tag) != 1 || p->tag <= 0 || p->tag > 999999999) {
+ /* RFC4568 9.1 - tag is 1-9 digits */
+ p->tag = atoi(tag);
+ snprintf(buf, sizeof(buf), "%d", p->tag);
+ if (strcmp(buf, tag) || p->tag < 0 || p->tag > 999999999) {
ast_log(LOG_WARNING, "Unacceptable a=crypto tag: %s\n", tag);
return -1;
}
@@ -0,0 +1,15 @@
$NetBSD: patch-codecs_codec__dahdi.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- codecs/codec_dahdi.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ codecs/codec_dahdi.c
@@ -37,9 +37,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#include <fcntl.h>
#include <netinet/in.h>
+#include <poll.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
-#include <sys/poll.h>
#include <dahdi/user.h>
#include "asterisk/lock.h"
+14 -25
View File
@@ -1,8 +1,17 @@
$NetBSD: patch-configure,v 1.4 2013/06/14 04:26:55 jnemeth Exp $
$NetBSD: patch-configure,v 1.6 2016/09/23 19:16:29 jnemeth Exp $
--- configure.orig 2013-02-27 12:22:30.000000000 +0000
--- configure.orig 2015-10-09 22:23:39.000000000 +0000
+++ configure
@@ -14200,7 +14200,7 @@ fi
@@ -12409,7 +12409,7 @@ fi
done
-ac_fn_c_check_header_mongrel "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
+ac_fn_c_check_header_mongrel "$LINENO" "poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_poll_h" = xyes; then :
else
@@ -14464,7 +14464,7 @@ fi
done
@@ -11,27 +20,7 @@ $NetBSD: patch-configure,v 1.4 2013/06/14 04:26:55 jnemeth Exp $
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -16195,16 +16195,16 @@ if $(${CC} -march=native -S -o /dev/null
if test "${CONFIG_CFLAGS}" = ""; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- AST_NATIVE_ARCH=1
+ AST_NATIVE_ARCH=0
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: user CFLAGS present" >&5
$as_echo "user CFLAGS present" >&6; }
- AST_NATIVE_ARCH=
+ AST_NATIVE_ARCH=0
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- AST_NATIVE_ARCH=
+ AST_NATIVE_ARCH=0
fi
@@ -16729,6 +16729,148 @@ fi
@@ -16968,6 +16968,148 @@ fi
@@ -180,7 +169,7 @@ $NetBSD: patch-configure,v 1.4 2013/06/14 04:26:55 jnemeth Exp $
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -17871,6 +18013,8 @@ $as_echo_n "checking if \"struct ifaddrs
@@ -18218,6 +18360,8 @@ $as_echo_n "checking if \"struct ifaddrs
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+24 -12
View File
@@ -1,8 +1,17 @@
$NetBSD: patch-configure.ac,v 1.2 2013/06/14 04:26:55 jnemeth Exp $
$NetBSD: patch-configure.ac,v 1.4 2016/09/23 19:16:29 jnemeth Exp $
--- configure.ac.orig 2013-02-26 19:45:09.000000000 +0000
--- configure.ac.orig 2015-10-09 22:23:39.000000000 +0000
+++ configure.ac
@@ -584,7 +584,7 @@ AC_FUNC_STRNLEN
@@ -543,7 +543,7 @@ AC_CHECK_HEADERS([xlocale.h])
AC_CHECK_HEADERS([winsock.h winsock2.h])
-AC_CHECK_HEADER([sys/poll.h],
+AC_CHECK_HEADER([poll.h],
[],
AC_DEFINE([AST_POLL_COMPAT], 1, [Define to 1 if internal poll should be used.]))
@@ -597,7 +597,7 @@ AC_FUNC_STRNLEN
AC_FUNC_STRTOD
AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
@@ -11,16 +20,19 @@ $NetBSD: patch-configure.ac,v 1.2 2013/06/14 04:26:55 jnemeth Exp $
# NOTE: we use AC_CHECK_LIB to get -lm into the arguments for later checks,
# so that AC_CHECK_FUNCS can detect functions in that library.
@@ -1036,7 +1036,7 @@ if $(${CC} -march=native -S -o /dev/null
fi
else
AC_MSG_RESULT(no)
- AST_NATIVE_ARCH=
+ AST_NATIVE_ARCH=0
fi
AC_SUBST(AST_NATIVE_ARCH)
@@ -648,9 +648,9 @@ AC_SUBST(PBX_DYNAMIC_LIST)
LDFLAGS=${old_LDFLAGS}
rm -f conftest.dynamics
@@ -1160,6 +1160,9 @@ AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [I
-AC_CHECK_HEADER([sys/poll.h],
+AC_CHECK_HEADER([poll.h],
[HAS_POLL=1]
- AC_DEFINE([HAVE_SYS_POLL_H], 1, [Define to 1 if your system has working sys/poll.h]),
+ AC_DEFINE([HAVE_SYS_POLL_H], 1, [Define to 1 if your system has working poll.h]),
)
AC_ARG_ENABLE([internal-poll],
@@ -1162,6 +1162,9 @@ AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [I
AC_CHECK_HEADER([libkern/OSAtomic.h],
[AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
@@ -0,0 +1,13 @@
$NetBSD: patch-funcs_func__env.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- funcs/func_env.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ funcs/func_env.c
@@ -309,7 +309,7 @@ static int stat_read(struct ast_channel
snprintf(buf, len, "%d", (int) s.st_ctime);
break;
case 'm':
- snprintf(buf, len, "%o", s.st_mode);
+ snprintf(buf, len, "%o", (unsigned int) s.st_mode);
break;
}
}
@@ -0,0 +1,131 @@
$NetBSD: patch-include_asterisk_sha1.h,v 1.1 2016/09/23 19:16:29 jnemeth Exp $
--- include/asterisk/sha1.h.orig 2016-09-08 16:28:35.000000000 +0000
+++ include/asterisk/sha1.h
@@ -191,49 +191,6 @@ typedef struct SHA256Context SHA224Conte
typedef struct SHA512Context SHA384Context;
/*
- * This structure holds context information for all SHA
- * hashing operations.
- */
-typedef struct USHAContext {
- int whichSha; /* which SHA is being used */
- union {
- SHA1Context sha1Context;
- SHA224Context sha224Context; SHA256Context sha256Context;
- SHA384Context sha384Context; SHA512Context sha512Context;
- } ctx;
-} USHAContext;
-
-/*
- * This structure will hold context information for the HMAC
- * keyed-hashing operation.
- */
-typedef struct HMACContext {
- int whichSha; /* which SHA is being used */
- int hashSize; /* hash size of SHA being used */
- int blockSize; /* block size of SHA being used */
- USHAContext shaContext; /* SHA context */
- unsigned char k_opad[USHA_Max_Message_Block_Size];
- /* outer padding - key XORd with opad */
- int Computed; /* Is the MAC computed? */
- int Corrupted; /* Cumulative corruption code */
-
-} HMACContext;
-
-/*
- * This structure will hold context information for the HKDF
- * extract-and-expand Key Derivation Functions.
- */
-typedef struct HKDFContext {
- int whichSha; /* which SHA is being used */
- HMACContext hmacContext;
- int hashSize; /* hash size of SHA being used */
- unsigned char prk[USHAMaxHashSize];
- /* pseudo-random key - output of hkdfInput */
- int Computed; /* Is the key material computed? */
- int Corrupted; /* Cumulative corruption code */
-} HKDFContext;
-
-/*
* Function Prototypes
*/
@@ -281,76 +238,6 @@ extern int SHA512FinalBits(SHA512Context
extern int SHA512Result(SHA512Context *,
uint8_t Message_Digest[SHA512HashSize]);
-/* Unified SHA functions, chosen by whichSha */
-extern int USHAReset(USHAContext *context, SHAversion whichSha);
-extern int USHAInput(USHAContext *context,
- const uint8_t *bytes, unsigned int bytecount);
-extern int USHAFinalBits(USHAContext *context,
- uint8_t bits, unsigned int bit_count);
-extern int USHAResult(USHAContext *context,
- uint8_t Message_Digest[USHAMaxHashSize]);
-extern int USHABlockSize(enum SHAversion whichSha);
-extern int USHAHashSize(enum SHAversion whichSha);
-extern int USHAHashSizeBits(enum SHAversion whichSha);
-extern const char *USHAHashName(enum SHAversion whichSha);
-
-/*
- * HMAC Keyed-Hashing for Message Authentication, RFC 2104,
- * for all SHAs.
- * This interface allows a fixed-length text input to be used.
- */
-extern int hmac(SHAversion whichSha, /* which SHA algorithm to use */
- const unsigned char *text, /* pointer to data stream */
- int text_len, /* length of data stream */
- const unsigned char *key, /* pointer to authentication key */
- int key_len, /* length of authentication key */
- uint8_t digest[USHAMaxHashSize]); /* caller digest to fill in */
-
-/*
- * HMAC Keyed-Hashing for Message Authentication, RFC 2104,
- * for all SHAs.
- * This interface allows any length of text input to be used.
- */
-extern int hmacReset(HMACContext *context, enum SHAversion whichSha,
- const unsigned char *key, int key_len);
-extern int hmacInput(HMACContext *context, const unsigned char *text,
- int text_len);
-extern int hmacFinalBits(HMACContext *context, uint8_t bits,
- unsigned int bit_count);
-extern int hmacResult(HMACContext *context,
- uint8_t digest[USHAMaxHashSize]);
-
-/*
- * HKDF HMAC-based Extract-and-Expand Key Derivation Function,
- * RFC 5869, for all SHAs.
- */
-extern int hkdf(SHAversion whichSha, const unsigned char *salt,
- int salt_len, const unsigned char *ikm, int ikm_len,
- const unsigned char *info, int info_len,
- uint8_t okm[ ], int okm_len);
-extern int hkdfExtract(SHAversion whichSha, const unsigned char *salt,
- int salt_len, const unsigned char *ikm,
- int ikm_len, uint8_t prk[USHAMaxHashSize]);
-extern int hkdfExpand(SHAversion whichSha, const uint8_t prk[ ],
- int prk_len, const unsigned char *info,
- int info_len, uint8_t okm[ ], int okm_len);
-
-/*
- * HKDF HMAC-based Extract-and-Expand Key Derivation Function,
- * RFC 5869, for all SHAs.
- * This interface allows any length of text input to be used.
- */
-extern int hkdfReset(HKDFContext *context, enum SHAversion whichSha,
- const unsigned char *salt, int salt_len);
-extern int hkdfInput(HKDFContext *context, const unsigned char *ikm,
- int ikm_len);
-extern int hkdfFinalBits(HKDFContext *context, uint8_t ikm_bits,
- unsigned int ikm_bit_count);
-extern int hkdfResult(HKDFContext *context,
- uint8_t prk[USHAMaxHashSize],
- const unsigned char *info, int info_len,
- uint8_t okm[USHAMaxHashSize], int okm_len);
-
/************************ sha-private.h ************************/
/***************** See RFC 6234 for details. *******************/
/*
+3 -3
View File
@@ -1,6 +1,6 @@
$NetBSD: patch-main_cdr.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $
$NetBSD: patch-main_cdr.c,v 1.2 2015/10/27 08:49:01 jnemeth Exp $
--- main/cdr.c.orig 2013-08-06 08:19:42.000000000 +0000
--- main/cdr.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ main/cdr.c
@@ -260,7 +260,7 @@ static const char *ast_cdr_getvar_intern
static void cdr_get_tv(struct timeval when, const char *fmt, char *buf, int bufsize)
@@ -23,7 +23,7 @@ $NetBSD: patch-main_cdr.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $
} else if (!strcasecmp(name, "disposition")) {
if (raw) {
- snprintf(workspace, workspacelen, "%ld", cdr->disposition);
+ snprintf(workspace, workspacelen, "%jd", cdr->disposition);
+ snprintf(workspace, workspacelen, "%jd", (intmax_t)cdr->disposition);
} else {
ast_copy_string(workspace, ast_cdr_disp2str(cdr->disposition), workspacelen);
}
@@ -0,0 +1,22 @@
$NetBSD: patch-main_channel.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- main/channel.c.orig 2015-10-24 19:56:31.000000000 +0000
+++ main/channel.c
@@ -5907,15 +5907,8 @@ static int set_security_requirements(con
ast_channel_unlock(r);
for (i = 0; i < 2; i++) {
- if (ops[i][1]) {
- if (ast_channel_setoption(out, ops[i][0], &ops[i][1], sizeof(ops[i][1]), 0)) {
- /* We require a security feature, but the channel won't provide it */
- return -1;
- }
- } else {
- /* We don't care if we can't clear the option on a channel that doesn't support it */
- ast_channel_setoption(out, ops[i][0], &ops[i][1], sizeof(ops[i][1]), 0);
- }
+ /* We don't care if we can't clear the option on a channel that doesn't support it */
+ ast_channel_setoption(out, ops[i][0], &ops[i][1], sizeof(ops[i][1]), 0);
}
return 0;
+13 -4
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-main_pbx.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $
$NetBSD: patch-main_pbx.c,v 1.2 2015/10/27 08:49:01 jnemeth Exp $
--- main/pbx.c.orig 2015-01-30 16:55:39.000000000 +0000
--- main/pbx.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ main/pbx.c
@@ -11201,7 +11201,7 @@ static int testtime_write(struct ast_cha
@@ -11427,7 +11427,7 @@ static int testtime_write(struct ast_cha
sscanf(remainder, "%79s", timezone);
tv = ast_mktime(&tm, S_OR(timezone, NULL));
@@ -11,7 +11,16 @@ $NetBSD: patch-main_pbx.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $
pbx_builtin_setvar_helper(chan, "__TESTTIME", result);
return 0;
}
@@ -11235,7 +11235,7 @@ static int pbx_builtin_gotoiftime(struct
@@ -11446,7 +11446,7 @@ static int pbx_builtin_gotoiftime(struct
struct ast_timing timing;
const char *ctime;
struct timeval tv = ast_tvnow();
- long timesecs;
+ intmax_t timesecs;
if (!chan) {
ast_log(LOG_WARNING, "GotoIfTime requires a channel on which to operate\n");
@@ -11461,7 +11461,7 @@ static int pbx_builtin_gotoiftime(struct
ts = s = ast_strdupa(data);
ast_channel_lock(chan);
+10 -12
View File
@@ -1,29 +1,27 @@
$NetBSD: patch-main_sched.c,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
$NetBSD: patch-main_sched.c,v 1.3 2016/02/07 08:18:43 jnemeth Exp $
--- main/sched.c.orig 2012-06-15 16:20:16.000000000 +0000
--- main/sched.c.orig 2016-02-03 21:23:32.000000000 +0000
+++ main/sched.c
@@ -349,7 +349,7 @@ static int sched_settime(struct timeval
{
struct timeval now = ast_tvnow();
@@ -492,7 +492,7 @@ static int sched_settime(struct timeval
ast_assert(0);
}
- /*ast_debug(1, "TV -> %lu,%lu\n", tv->tv_sec, tv->tv_usec);*/
+ /*ast_debug(1, "TV -> %jd,%jd\n", tv->tv_sec, tv->tv_usec);*/
+ /*ast_debug(1, "TV -> %jd,%lu\n", (intmax_t)tv->tv_sec, tv->tv_usec);*/
if (ast_tvzero(*t)) /* not supplied, default to now */
*t = now;
*t = ast_tvadd(*t, ast_samp2tv(when, 1000));
@@ -557,12 +557,12 @@ void ast_sched_dump(struct ast_sched_con
@@ -706,11 +706,11 @@ void ast_sched_dump(struct ast_sched_con
struct timeval delta;
q = ast_heap_peek(con->sched_heap, x);
delta = ast_tvsub(q->when, when);
- ast_debug(1, "|%.4d | %-15p | %-15p | %.6ld : %.6ld |\n",
+ ast_debug(1, "|%.4d | %-15p | %-15p | %.6jd : %.6jd |\n",
q->id,
+ ast_debug(1, "|%.4d | %-15p | %-15p | %.6jd : %.6ld |\n",
q->sched_id->id,
q->callback,
q->data,
- (long)delta.tv_sec,
- (long int)delta.tv_usec);
+ (intmax_t)delta.tv_sec,
+ (intmax_t)delta.tv_usec);
(long int)delta.tv_usec);
}
ast_mutex_unlock(&con->lock);
ast_debug(1, "=============================================================\n");
@@ -1,8 +1,19 @@
$NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
$NetBSD: patch-main_stdtime_localtime.c,v 1.3 2015/10/27 08:49:01 jnemeth Exp $
--- main/stdtime/localtime.c.orig 2015-03-10 17:42:57.000000000 +0000
--- main/stdtime/localtime.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ main/stdtime/localtime.c
@@ -733,7 +733,7 @@ static void *notify_daemon(void *data)
@@ -67,6 +67,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#include <sys/stat.h>
#include <fcntl.h>
#endif
+#ifdef __sun
+#include <time.h>
+#include <xlocale.h>
+#endif
#include "private.h"
#include "tzfile.h"
@@ -733,7 +737,7 @@ static void *notify_daemon(void *data)
if (st.st_mtime > cur->mtime[0] || lst.st_mtime > cur->mtime[1]) {
#ifdef TEST_FRAMEWORK
if (test) {
@@ -11,7 +22,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
} else
#endif
{
@@ -2417,6 +2417,23 @@ static struct locale_entry *find_by_name
@@ -2417,6 +2421,23 @@ static struct locale_entry *find_by_name
return NULL;
}
@@ -35,7 +46,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
static const char *store_by_locale(locale_t prevlocale)
{
struct locale_entry *cur;
@@ -2474,6 +2491,7 @@ const char *ast_setlocale(const char *lo
@@ -2474,6 +2495,7 @@ const char *ast_setlocale(const char *lo
AST_LIST_UNLOCK(&localelist);
return store_by_locale(prevlocale);
}
@@ -43,7 +54,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
#else
const char *ast_setlocale(const char *unused)
{
@@ -2487,7 +2505,9 @@ int ast_strftime_locale(char *buf, size_
@@ -2487,7 +2509,9 @@ int ast_strftime_locale(char *buf, size_
char *format = ast_calloc(1, fmtlen), *fptr = format, *newfmt;
int decimals = -1, i, res;
long fraction;
@@ -53,7 +64,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
buf[0] = '\0';/* Ensure the buffer is initialized. */
if (!format) {
@@ -2542,6 +2562,14 @@ defcase: *fptr++ = *tmp;
@@ -2542,6 +2566,14 @@ defcase: *fptr++ = *tmp;
}
*fptr = '\0';
#undef strftime
@@ -68,7 +79,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
if (locale) {
prevlocale = ast_setlocale(locale);
}
@@ -2549,6 +2577,7 @@ defcase: *fptr++ = *tmp;
@@ -2549,6 +2581,7 @@ defcase: *fptr++ = *tmp;
if (locale) {
ast_setlocale(prevlocale);
}
@@ -76,7 +87,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
ast_free(format);
return res;
}
@@ -2562,11 +2591,22 @@ char *ast_strptime_locale(const char *s,
@@ -2562,11 +2595,22 @@ char *ast_strptime_locale(const char *s,
{
struct tm tm2 = { 0, };
char *res;
@@ -0,0 +1,27 @@
$NetBSD: patch-res_ael_pval.c,v 1.1 2016/07/23 08:27:44 jnemeth Exp $
--- res/ael/pval.c.orig 2016-07-21 14:56:56.000000000 +0000
+++ res/ael/pval.c
@@ -3344,6 +3344,9 @@ int contains_switch(pval *item)
return 0;
}
+RAII_DECL(char *, buf1, free);
+RAII_DECL(char *, buf2, free);
+RAII_DECL(char *, new_label, free);
static int gen_prios(struct ael_extension *exten, char *label, pval *statement, struct ael_extension *mother_exten, struct ast_context *this_context )
{
@@ -3356,9 +3359,9 @@ static int gen_prios(struct ael_extensio
#ifdef OLD_RAND_ACTION
struct ael_priority *rand_test, *rand_end, *rand_skip;
#endif
- RAII_VAR(char *, buf1, NULL, free);
- RAII_VAR(char *, buf2, NULL, free);
- RAII_VAR(char *, new_label, NULL, free);
+ RAII_VAR(char *, buf1, NULL);
+ RAII_VAR(char *, buf2, NULL);
+ RAII_VAR(char *, new_label, NULL);
char *strp, *strp2;
int default_exists;
int local_control_statement_count;
@@ -0,0 +1,32 @@
$NetBSD: patch-res_pjproject_pjlib_include_pj_config.h,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- res/pjproject/pjlib/include/pj/config.h.orig 2015-10-09 22:23:39.000000000 +0000
+++ res/pjproject/pjlib/include/pj/config.h
@@ -555,7 +555,7 @@
* the underlying implementation changes.
*/
#ifndef PJ_IOQUEUE_MAX_HANDLES
-# define PJ_IOQUEUE_MAX_HANDLES (64)
+# define PJ_IOQUEUE_MAX_HANDLES (1024)
#endif
@@ -622,16 +622,10 @@
/**
* Determine if FD_SETSIZE is changeable/set-able. If so, then we will
- * set it to PJ_IOQUEUE_MAX_HANDLES. Currently we detect this by checking
- * for Winsock.
+ * set it to PJ_IOQUEUE_MAX_HANDLES. Assumed to be supported by default.
*/
#ifndef PJ_FD_SETSIZE_SETABLE
-# if (defined(PJ_HAS_WINSOCK_H) && PJ_HAS_WINSOCK_H!=0) || \
- (defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H!=0)
-# define PJ_FD_SETSIZE_SETABLE 1
-# else
-# define PJ_FD_SETSIZE_SETABLE 0
-# endif
+# define PJ_FD_SETSIZE_SETABLE 1
#endif
/**
@@ -0,0 +1,21 @@
$NetBSD: patch-res_pjproject_pjlib_include_pj_sock__select.h,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- res/pjproject/pjlib/include/pj/sock_select.h.orig 2015-10-09 22:23:39.000000000 +0000
+++ res/pjproject/pjlib/include/pj/sock_select.h
@@ -25,6 +25,7 @@
* @brief Socket select().
*/
+#include <limits.h>
#include <pj/types.h>
PJ_BEGIN_DECL
@@ -55,7 +56,7 @@ PJ_BEGIN_DECL
*/
typedef struct pj_fd_set_t
{
- pj_sock_t data[PJ_IOQUEUE_MAX_HANDLES+ 4]; /**< Opaque buffer for fd_set */
+ pj_sock_t data[PJ_IOQUEUE_MAX_HANDLES / sizeof(pj_sock_t) / CHAR_BIT + 4]; /**< Opaque buffer for fd_set */
} pj_fd_set_t;
@@ -0,0 +1,52 @@
$NetBSD: patch-res_pjproject_pjlib_src_pj_sock__select.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- res/pjproject/pjlib/src/pj/sock_select.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ res/pjproject/pjlib/src/pj/sock_select.c
@@ -40,10 +40,11 @@
#define PART_FDSET_OR_NULL(ps) (ps ? PART_FDSET(ps) : NULL)
#define PART_COUNT(ps) (ps->data[0])
+typedef char pj_assert_fd_set_t[(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set)) ? 1 : -1];
+
PJ_DEF(void) PJ_FD_ZERO(pj_fd_set_t *fdsetp)
{
PJ_CHECK_STACK();
- pj_assert(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set));
FD_ZERO(PART_FDSET(fdsetp));
PART_COUNT(fdsetp) = 0;
@@ -53,7 +54,6 @@ PJ_DEF(void) PJ_FD_ZERO(pj_fd_set_t *fds
PJ_DEF(void) PJ_FD_SET(pj_sock_t fd, pj_fd_set_t *fdsetp)
{
PJ_CHECK_STACK();
- pj_assert(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set));
if (!PJ_FD_ISSET(fd, fdsetp))
++PART_COUNT(fdsetp);
@@ -64,7 +64,6 @@ PJ_DEF(void) PJ_FD_SET(pj_sock_t fd, pj_
PJ_DEF(void) PJ_FD_CLR(pj_sock_t fd, pj_fd_set_t *fdsetp)
{
PJ_CHECK_STACK();
- pj_assert(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set));
if (PJ_FD_ISSET(fd, fdsetp))
--PART_COUNT(fdsetp);
@@ -75,8 +74,6 @@ PJ_DEF(void) PJ_FD_CLR(pj_sock_t fd, pj_
PJ_DEF(pj_bool_t) PJ_FD_ISSET(pj_sock_t fd, const pj_fd_set_t *fdsetp)
{
PJ_CHECK_STACK();
- PJ_ASSERT_RETURN(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set),
- 0);
return FD_ISSET(fd, PART_FDSET(fdsetp));
}
@@ -96,9 +93,6 @@ PJ_DEF(int) pj_sock_select( int n,
PJ_CHECK_STACK();
- PJ_ASSERT_RETURN(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set),
- PJ_EBUG);
-
if (timeout) {
os_timeout.tv_sec = timeout->sec;
os_timeout.tv_usec = timeout->msec * 1000;
@@ -0,0 +1,13 @@
$NetBSD: patch-res_pjproject_third__party_portaudio_src_hostapi_alsa_pa__linux__alsa.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- res/pjproject/third_party/portaudio/src/hostapi/alsa/pa_linux_alsa.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ res/pjproject/third_party/portaudio/src/hostapi/alsa/pa_linux_alsa.c
@@ -53,7 +53,7 @@
#undef ALSA_PCM_NEW_HW_PARAMS_API
#undef ALSA_PCM_NEW_SW_PARAMS_API
-#include <sys/poll.h>
+#include <poll.h>
#include <string.h> /* strlen() */
#include <limits.h>
#include <math.h>
@@ -0,0 +1,13 @@
$NetBSD: patch-res_pjproject_third__party_portaudio_src_hostapi_oss_pa__unix__oss.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- res/pjproject/third_party/portaudio/src/hostapi/oss/pa_unix_oss.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ res/pjproject/third_party/portaudio/src/hostapi/oss/pa_unix_oss.c
@@ -59,7 +59,7 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <limits.h>
#include <semaphore.h>
@@ -0,0 +1,431 @@
$NetBSD: patch-res_res__timing__kqueue.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- res/res_timing_kqueue.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ res/res_timing_kqueue.c
@@ -71,9 +71,12 @@ static struct ast_timing_interface kqueu
static struct ao2_container *kqueue_timers;
struct kqueue_timer {
+ intptr_t period;
int handle;
- uint64_t nsecs;
- uint64_t unacked;
+#ifndef EVFILT_USER
+ int continuous_fd;
+ unsigned int continuous_fd_valid:1;
+#endif
unsigned int is_continuous:1;
};
@@ -90,6 +93,78 @@ static int kqueue_timer_cmp(void *obj, v
return timer1->handle == timer2->handle ? CMP_MATCH | CMP_STOP : 0;
}
+#ifdef EVFILT_USER
+#define CONTINUOUS_EVFILT_TYPE EVFILT_USER
+static int kqueue_timer_init_continuous_event(struct kqueue_timer *timer)
+{
+ return 0;
+}
+
+static int kqueue_timer_enable_continuous_event(struct kqueue_timer *timer)
+{
+ struct kevent kev[2];
+
+ EV_SET(&kev[0], (uintptr_t)timer, EVFILT_USER, EV_ADD | EV_ENABLE,
+ 0, 0, NULL);
+ EV_SET(&kev[1], (uintptr_t)timer, EVFILT_USER, 0, NOTE_TRIGGER,
+ 0, NULL);
+ return kevent(timer->handle, kev, 2, NULL, 0, NULL);
+}
+
+static int kqueue_timer_disable_continuous_event(struct kqueue_timer *timer)
+{
+ struct kevent kev;
+
+ EV_SET(&kev, (uintptr_t)timer, EVFILT_USER, EV_DELETE, 0, 0, NULL);
+ return kevent(timer->handle, &kev, 1, NULL, 0, NULL);
+}
+
+static void kqueue_timer_fini_continuous_event(struct kqueue_timer *timer)
+{
+}
+
+#else /* EVFILT_USER */
+
+#define CONTINUOUS_EVFILT_TYPE EVFILT_READ
+static int kqueue_timer_init_continuous_event(struct kqueue_timer *timer)
+{
+ int pipefds[2];
+ int retval;
+
+ retval = pipe(pipefds);
+ if (retval == 0) {
+ timer->continuous_fd = pipefds[0];
+ timer->continuous_fd_valid = 1;
+ close(pipefds[1]);
+ }
+ return retval;
+}
+
+static void kqueue_timer_fini_continuous_event(struct kqueue_timer *timer)
+{
+ if (timer->continuous_fd_valid) {
+ close(timer->continuous_fd);
+ }
+}
+
+static int kqueue_timer_enable_continuous_event(struct kqueue_timer *timer)
+{
+ struct kevent kev;
+
+ EV_SET(&kev, timer->continuous_fd, EVFILT_READ, EV_ADD | EV_ENABLE,
+ 0, 0, NULL);
+ return kevent(timer->handle, &kev, 1, NULL, 0, NULL);
+}
+
+static int kqueue_timer_disable_continuous_event(struct kqueue_timer *timer)
+{
+ struct kevent kev;
+
+ EV_SET(&kev, timer->continuous_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
+ return kevent(timer->handle, &kev, 1, NULL, 0, NULL);
+}
+#endif
+
static void timer_destroy(void *obj)
{
struct kqueue_timer *timer = obj;
@@ -120,15 +195,25 @@ static int kqueue_timer_open(void)
int handle;
if (!(timer = ao2_alloc(sizeof(*timer), timer_destroy))) {
- ast_log(LOG_ERROR, "Could not allocate memory for kqueue_timer structure\n");
+ ast_log(LOG_ERROR, "Alloc failed for kqueue_timer structure\n");
return -1;
}
+
if ((timer->handle = handle = kqueue()) < 0) {
- ast_log(LOG_ERROR, "Failed to create kqueue timer: %s\n", strerror(errno));
+ ast_log(LOG_ERROR, "Failed to create kqueue fd: %s\n",
+ strerror(errno));
ao2_ref(timer, -1);
return -1;
}
+ if (kqueue_timer_init_continuous_event(timer) != 0) {
+ ast_log(LOG_ERROR, "Failed to create continuous event: %s\n",
+ strerror(errno));
+ ao2_ref(timer, -1);
+ return -1;
+ }
+ ast_debug(5, "[%d]: Create timer\n", timer->handle);
+
ao2_link(kqueue_timers, timer);
/* Get rid of the reference from the allocation */
ao2_ref(timer, -1);
@@ -143,54 +228,86 @@ static void kqueue_timer_close(int handl
return;
}
+ ast_debug(5, "[%d]: Timer close\n", our_timer->handle);
ao2_unlink(kqueue_timers, our_timer);
ao2_ref(our_timer, -1);
}
-static void kqueue_set_nsecs(struct kqueue_timer *our_timer, uint64_t nsecs)
+/*
+ * Use the highest precision available that does not overflow
+ * the datatype kevent is using for time.
+ */
+static intptr_t kqueue_scale_period(unsigned int period_ns, int *units)
{
- struct timespec nowait = { 0, 1 };
-#ifdef HAVE_KEVENT64
- struct kevent64_s kev;
-
- EV_SET64(&kev, our_timer->handle, EVFILT_TIMER, EV_ADD | EV_ENABLE, NOTE_NSECONDS,
- nsecs, 0, 0, 0);
- kevent64(our_timer->handle, &kev, 1, NULL, 0, 0, &nowait);
-#else
- struct kevent kev;
-
- EV_SET(&kev, our_timer->handle, EVFILT_TIMER, EV_ADD | EV_ENABLE,
-#ifdef NOTE_NSECONDS
- nsecs <= 0xFFffFFff ? NOTE_NSECONDS :
-#endif
-#ifdef NOTE_USECONDS
- NOTE_USECONDS
-#else /* Milliseconds, if no constants are defined */
- 0
-#endif
- ,
+ uint64_t period = period_ns;
+ *units = 0;
#ifdef NOTE_NSECONDS
- nsecs <= 0xFFffFFff ? nsecs :
-#endif
+ if (period < INTPTR_MAX) {
+ *units = NOTE_NSECONDS;
+ } else {
#ifdef NOTE_USECONDS
- nsecs / 1000
-#else /* Milliseconds, if nothing else is defined */
- nsecs / 1000000
-#endif
- , NULL);
- kevent(our_timer->handle, &kev, 1, NULL, 0, &nowait);
+ period /= 1000;
+ if (period < INTPTR_MAX) {
+ *units = NOTE_USECONDS;
+ } else {
+ period /= 1000;
+#ifdef NOTE_MSECONDS
+ *units = NOTE_MSECONDS;
+#endif /* NOTE_MSECONDS */
+ }
+#else /* NOTE_USECONDS */
+ period /= 1000000;
+#ifdef NOTE_MSECONDS
+ *units = NOTE_MSECONDS;
+#endif /* NOTE_MSECONDS */
+#endif /* NOTE_USECONDS */
+ }
+#else /* NOTE_NSECONDS */
+ period /= 1000000;
#endif
+ if (period > INTPTR_MAX) {
+ period = INTPTR_MAX;
+ }
+ return period;
}
static int kqueue_timer_set_rate(int handle, unsigned int rate)
{
+ struct kevent kev;
struct kqueue_timer *our_timer;
+ uint64_t period_ns;
+ int flags;
+ int units;
+ int retval;
if (!(our_timer = lookup_timer(handle))) {
return -1;
}
- kqueue_set_nsecs(our_timer, (our_timer->nsecs = rate ? (long) (1000000000 / rate) : 0L));
+ if (rate == 0) {
+ if (our_timer->period == 0) {
+ ao2_ref(our_timer, -1);
+ return 0;
+ }
+ flags = EV_DELETE;
+ our_timer->period = 0;
+ units = 0;
+ } else {
+ flags = EV_ADD | EV_ENABLE;
+ period_ns = (uint64_t)1000000000 / rate;
+ our_timer->period = kqueue_scale_period(period_ns, &units);
+ }
+ ast_debug(5, "[%d]: Set rate %u:%ju\n",
+ our_timer->handle, units, (uintmax_t)our_timer->period);
+ EV_SET(&kev, our_timer->handle, EVFILT_TIMER, flags, units,
+ our_timer->period, NULL);
+ retval = kevent(our_timer->handle, &kev, 1, NULL, 0, NULL);
+
+ if (retval == -1) {
+ ast_log(LOG_ERROR, "[%d]: Error queueing timer: %s\n",
+ our_timer->handle, strerror(errno));
+ }
+
ao2_ref(our_timer, -1);
return 0;
@@ -198,75 +315,113 @@ static int kqueue_timer_set_rate(int han
static int kqueue_timer_ack(int handle, unsigned int quantity)
{
+ static struct timespec ts_nowait = { 0, 0 };
struct kqueue_timer *our_timer;
+ struct kevent kev[2];
+ int i, retval;
if (!(our_timer = lookup_timer(handle))) {
return -1;
}
- if (our_timer->unacked < quantity) {
- ast_debug(1, "Acking more events than have expired?!!\n");
- our_timer->unacked = 0;
+ retval = kevent(our_timer->handle, NULL, 0, kev, 2, &ts_nowait);
+ if (retval == -1) {
+ ast_log(LOG_ERROR, "[%d]: Error sampling kqueue: %s\n",
+ our_timer->handle, strerror(errno));
ao2_ref(our_timer, -1);
return -1;
- } else {
- our_timer->unacked -= quantity;
+ }
+
+ for (i = 0; i < retval; i++) {
+ switch (kev[i].filter) {
+ case EVFILT_TIMER:
+ if (kev[i].data > quantity) {
+ ast_log(LOG_ERROR, "[%d]: Missed %ju\n",
+ our_timer->handle,
+ (uintmax_t)kev[i].data - quantity);
+ }
+ break;
+ case CONTINUOUS_EVFILT_TYPE:
+ if (!our_timer->is_continuous) {
+ ast_log(LOG_ERROR,
+ "[%d]: Spurious user event\n",
+ our_timer->handle);
+ }
+ break;
+ default:
+ ast_log(LOG_ERROR, "[%d]: Spurious kevent type %d.\n",
+ our_timer->handle, kev[i].filter);
+ }
}
ao2_ref(our_timer, -1);
+
return 0;
}
static int kqueue_timer_enable_continuous(int handle)
{
struct kqueue_timer *our_timer;
+ int retval;
if (!(our_timer = lookup_timer(handle))) {
return -1;
}
- kqueue_set_nsecs(our_timer, 1);
- our_timer->is_continuous = 1;
- our_timer->unacked = 0;
+ if (!our_timer->is_continuous) {
+ ast_debug(5, "[%d]: Enable continuous\n", our_timer->handle);
+ retval = kqueue_timer_enable_continuous_event(our_timer);
+ if (retval == -1) {
+ ast_log(LOG_ERROR,
+ "[%d]: Error signalling continuous event: %s\n",
+ our_timer->handle, strerror(errno));
+ }
+ our_timer->is_continuous = 1;
+ }
+
ao2_ref(our_timer, -1);
+
return 0;
}
static int kqueue_timer_disable_continuous(int handle)
{
struct kqueue_timer *our_timer;
+ int retval;
if (!(our_timer = lookup_timer(handle))) {
return -1;
}
- kqueue_set_nsecs(our_timer, our_timer->nsecs);
- our_timer->is_continuous = 0;
- our_timer->unacked = 0;
+ if (our_timer->is_continuous) {
+ ast_debug(5, "[%d]: Disable Continuous\n", our_timer->handle);
+ retval = kqueue_timer_disable_continuous_event(our_timer);
+ if (retval == -1) {
+ ast_log(LOG_ERROR,
+ "[%d]: Error clearing continuous event: %s\n",
+ our_timer->handle, strerror(errno));
+ }
+ our_timer->is_continuous = 0;
+ }
+
ao2_ref(our_timer, -1);
+
return 0;
}
static enum ast_timer_event kqueue_timer_get_event(int handle)
{
- enum ast_timer_event res = -1;
struct kqueue_timer *our_timer;
- struct timespec sixty_seconds = { 60, 0 };
- struct kevent kev;
+ enum ast_timer_event res;
if (!(our_timer = lookup_timer(handle))) {
- return -1;
+ return AST_TIMING_EVENT_EXPIRED;
}
- /* If we have non-ACKed events, just return immediately */
- if (our_timer->unacked == 0) {
- if (kevent(handle, NULL, 0, &kev, 1, &sixty_seconds) > 0) {
- our_timer->unacked += kev.data;
- }
- }
-
- if (our_timer->unacked > 0) {
- res = our_timer->is_continuous ? AST_TIMING_EVENT_CONTINUOUS : AST_TIMING_EVENT_EXPIRED;
+ if (our_timer->is_continuous) {
+ res = AST_TIMING_EVENT_CONTINUOUS;
+ } else {
+ res = AST_TIMING_EVENT_EXPIRED;
}
ao2_ref(our_timer, -1);
@@ -275,8 +430,7 @@ static enum ast_timer_event kqueue_timer
static unsigned int kqueue_timer_get_max_rate(int handle)
{
- /* Actually, the max rate is 2^64-1 seconds, but that's not representable in a 32-bit integer. */
- return UINT_MAX;
+ return INTPTR_MAX > UINT_MAX ? UINT_MAX : INTPTR_MAX;
}
#ifdef TEST_FRAMEWORK
@@ -331,13 +485,12 @@ AST_TEST_DEFINE(test_kqueue_timing)
res = AST_TEST_FAIL;
break;
}
-#if 0
- if (kt->unacked == 0) {
- ast_test_status_update(test, "Unacked events is 0, but there should be at least 1.\n");
- res = AST_TEST_FAIL;
+ if (kqueue_timer_ack(handle, 1) != 0) {
+ ast_test_status_update(test, "Acking event failed.\n");
+ res = AST_TEST_FAiL;
break;
}
-#endif
+
kqueue_timer_enable_continuous(handle);
start = ast_tvnow();
for (i = 0; i < 100; i++) {
@@ -351,15 +504,15 @@ AST_TEST_DEFINE(test_kqueue_timing)
res = AST_TEST_FAIL;
break;
}
+ if (kqueue_timer_ack(handle, 1) != 0) {
+ ast_test_status_update(test, "Acking event failed.\n");
+ res = AST_TEST_FAIL;
+ }
+
}
+
diff = ast_tvdiff_us(ast_tvnow(), start);
ast_test_status_update(test, "diff is %llu\n", diff);
- /*
- if (abs(diff - kt->unacked) == 0) {
- ast_test_status_update(test, "Unacked events should be around 1000, not %llu\n", kt->unacked);
- res = AST_TEST_FAIL;
- }
- */
} while (0);
kqueue_timer_close(handle);
return res;