Commit 18f60428 authored by Timo Teräs's avatar Timo Teräs
Browse files

main/asterisk: upgrade to 14.3.0

- rebase ASTERISK-24517
- remove upstreamed patch
parent 4b666867
......@@ -2,8 +2,8 @@
# Contributor: Timo Teras <timo.teras@iki.fi>
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=asterisk
pkgver=14.2.1
pkgrel=2
pkgver=14.3.0
pkgrel=0
pkgdesc="Asterisk: A Module Open Source PBX System"
pkgusers="asterisk"
pkggroups="asterisk"
......@@ -29,7 +29,6 @@ _download="http://downloads.asterisk.org/pub/telephony/asterisk/releases"
source="$_download/asterisk-$pkgver.tar.gz
http://dev.alpinelinux.org/~tteras/asterisk-addon-mp3-r201.patch.gz
ASTERISK-24517.patch
fix-strerror_r.patch
musl-mutex-init.patch
restore-multihomed-module.patch
......@@ -227,28 +226,9 @@ sound_en() {
chown -R asterisk:asterisk "$subpkgdir"/var/*/asterisk
}
md5sums="e65daf9b1d65b8047b2117f21587ab35 asterisk-14.2.1.tar.gz
126dd4fba66f4cf9aa94dfd7034e0ec4 asterisk-addon-mp3-r201.patch.gz
5f8eaac5d48c47033028abec56a881a5 ASTERISK-24517.patch
b562be4a764d275dad87682642b56ee3 fix-strerror_r.patch
1ca5e8326dc03c963a7ce5455d0f21ba musl-mutex-init.patch
f7038bbe05b7a32e7408fea7b92f7fc8 restore-multihomed-module.patch
4bdc82ba3d6bdfdedc71e5da2fde5ec2 asterisk.initd
ed31d7ba37bcf8b0346dcf8593c395f0 asterisk.confd
3e65172275684373e1a25c8a11224411 asterisk.logrotate"
sha256sums="b28b5131233db6c89bb3356c703033ec8a393ae378e4aae169993b60a5877ea4 asterisk-14.2.1.tar.gz
d32a5a695cee1699011d0e9ad02eb43af612def06f92017627194099edf98e3f asterisk-addon-mp3-r201.patch.gz
98a49e7241e0c7a7dd814ed472aa1b3be9b1ee3f2966c286fd8a3e11c7c278ae ASTERISK-24517.patch
546c0d60e08a17e7b888baada693a08608c3d4f54709e2959305c4a772bb8158 fix-strerror_r.patch
a5205ed44b57a72934baf8cde543ddb179f277494181818905110bfdcccfe7d9 musl-mutex-init.patch
c65bb73a276824ba8518aaa5f439e7fdbd10ba3b719bec9e848c55cfb8ca853a restore-multihomed-module.patch
10454553733e6cc52c6e9db508768a638655d99c095c5b39fb043858c088f21f asterisk.initd
d221148583b57f9c37d7160f2493f0d204ad11f7abb17e3a3534e108ad5452d7 asterisk.confd
77b253b6db71460acf9a51e87ad4c8582027a46db01a4c50fb048bada58c19d1 asterisk.logrotate"
sha512sums="cac5b9cb94f72cd2d60723ecf3cba15b2d19cbc29a5df6678481699f4f0344aa41d60cbce8bed8c863d5be7d3264c30bac3a90978b5b66ffde5652fa681c842f asterisk-14.2.1.tar.gz
sha512sums="9a3ccbd7dfce18ae7c81f4d005362771443293f295b590242c8754b76a9d6ebd8d9d3d0c0aaef565dcfbf66f020e432a64bc0d65d3bb14220ae88ae0f2e37a69 asterisk-14.3.0.tar.gz
aacef3f4796fb1abd33266998b53909cb4b36e7cc5ad2f7bac68bdc43e9a9072d9a4e2e7e681bddfa31f3d04575eb248afe6ea95da780c67e4829c1e22adfe1b asterisk-addon-mp3-r201.patch.gz
e0b43c8a0a7e041d5853f7508ebff747616d9745449ab4a5d28788fbe076f0e9d49dc7f9e818f5b55fd430c625d1d5ec8d8f7fe6f7c56315f16180ce405cf282 ASTERISK-24517.patch
46f661b5056a571181adfd93a34c836e2df091e1bfd400e0c09794f43b097c4401f47bf8f4b620a1549fa90bf287b3018d803c102c6c7835a67c4c85ea5c2e76 fix-strerror_r.patch
d9156e8a1d9848a8a65ad6cb91f23bcfb47b0e18f92a22f4ec8ae5aedbf8dd3a169ac151ff3aa1b7d595a687ade7ebb598d87cc575a0dd9b46549ede97064c2e ASTERISK-24517.patch
f72c2e04de80d3ed9ce841308101383a1655e6da7a3c888ad31fffe63d1280993e08aefcf8e638316d439c68b38ee05362c87503fca1f36343976a01af9d6eb1 musl-mutex-init.patch
935c25c7b1cdbd376056e20232a0e8c38dd32c344f50306d99930bf7cb37685c31329ead273b08ac9ab76daa9386adfb05b57440e46a39cb80e5542d65e8e3ed restore-multihomed-module.patch
cd5bd1c1d7db0a44b14eb10e6d098af0c6474c8fe1a57395090d6795ac00e9243d004b7d24eba2cfd5bd6d6407c271913e794551a8dfcf3cf93e89fc91349e12 asterisk.initd
......
This diff is collapsed.
From 3d7089121731a1122e1306e631adaf5004ac323c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Fri, 11 Nov 2016 08:29:40 +0200
Subject: [PATCH] addons/chan_mobile: do not use strerror_r
The two reasons why it might be used are that some systems do not
implement strerror in thread safe manner, and that strerror_r returns
the error code in the string in case there's no error message.
However, all of asterisk elsewhere uses strerror() and assumes it
to be thread safe. And in chan_mobile the errno is also explicitly
printed so neither of the above reasons are valid.
The reasoning to remove usage is that there are actually two versions
of strerror_r: XSI and GNU. They are incompatible in their return
value, and there's no easy way to figure out which one is being
used. glibc gives you the GNU version if _GNU_SOURCE is defined,
but the same feature test macro is needed for other symbols. On
all other systems you assumedly get XSI symbol, and compilation warnings
as well as non-working error printing.
Thus the easiest solution is to just remove strerror_r and use
strerror as rest of the code. Alternative is to introduce ast_strerror
in separate translation unit so it can request the XSI symbol in
glibc case, and replace all usage of strerror.
Change-Id: I84d35225b5642d85d48bc35fdf399afbae28a91d
---
addons/chan_mobile.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/addons/chan_mobile.c b/addons/chan_mobile.c
index 64d53b7..8d13c96 100644
--- a/addons/chan_mobile.c
+++ b/addons/chan_mobile.c
@@ -3855,10 +3855,7 @@ static void *do_monitor_phone(void *data)
}
if ((at_msg = at_read_full(hfp->rsock, buf, sizeof(buf))) < 0) {
- /* XXX gnu specific strerror_r is assummed here, this
- * is not really safe. See the strerror(3) man page
- * for more info. */
- ast_debug(1, "[%s] error reading from device: %s (%d)\n", pvt->id, strerror_r(errno, buf, sizeof(buf)), errno);
+ ast_debug(1, "[%s] error reading from device: %s (%d)\n", pvt->id, strerror(errno), errno);
break;
}
@@ -3995,7 +3992,7 @@ static void *do_monitor_phone(void *data)
ast_debug(1, "[%s] error parsing message\n", pvt->id);
goto e_cleanup;
case AT_READ_ERROR:
- ast_debug(1, "[%s] error reading from device: %s (%d)\n", pvt->id, strerror_r(errno, buf, sizeof(buf)), errno);
+ ast_debug(1, "[%s] error reading from device: %s (%d)\n", pvt->id, strerror(errno), errno);
goto e_cleanup;
default:
break;
@@ -4073,11 +4070,7 @@ static void *do_monitor_headset(void *data)
continue;
if ((at_msg = at_read_full(pvt->rfcomm_socket, buf, sizeof(buf))) < 0) {
- if (strerror_r(errno, buf, sizeof(buf)))
- ast_debug(1, "[%s] error reading from device\n", pvt->id);
- else
- ast_debug(1, "[%s] error reading from device: %s (%d)\n", pvt->id, buf, errno);
-
+ ast_debug(1, "[%s] error reading from device: %s (%d)\n", pvt->id, strerror(errno), errno);
goto e_cleanup;
}
ast_debug(1, "[%s] %s\n", pvt->id, buf);
--
2.10.2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment