summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavoz@gentoo.org>2007-04-26 22:14:26 +0000
committerGustavo Zacarias <gustavoz@gentoo.org>2007-04-26 22:14:26 +0000
commit51c8349e0a43eb4597bc9cd8081340e7f917ba2b (patch)
tree527435029fa4cb243af38c0d74fa4b2ff1691314 /net-misc/asterisk
parentCorrected lots of localisation issues. Fixes bug 172192. (diff)
downloadgentoo-2-51c8349e0a43eb4597bc9cd8081340e7f917ba2b.tar.gz
gentoo-2-51c8349e0a43eb4597bc9cd8081340e7f917ba2b.tar.bz2
gentoo-2-51c8349e0a43eb4597bc9cd8081340e7f917ba2b.zip
Fix for cvs breaking headers on patches #176170
(Portage version: 2.1.2.2)
Diffstat (limited to 'net-misc/asterisk')
-rw-r--r--net-misc/asterisk/ChangeLog7
-rw-r--r--net-misc/asterisk/asterisk-1.2.17.ebuild10
-rw-r--r--net-misc/asterisk/files/1.2.0/asterisk-1.2.17-ASA-2007-011.patch317
-rw-r--r--net-misc/asterisk/files/1.2.0/asterisk-1.2.17-ASA-2007-012.patch41
-rw-r--r--net-misc/asterisk/files/digest-asterisk-1.2.176
5 files changed, 11 insertions, 370 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog
index edca07c07b30..d69c2878b33e 100644
--- a/net-misc/asterisk/ChangeLog
+++ b/net-misc/asterisk/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-misc/asterisk
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.159 2007/04/26 19:44:30 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.160 2007/04/26 22:14:26 gustavoz Exp $
+
+ 26 Apr 2007; Gustavo Zacarias <gustavoz@gentoo.org>
+ -files/1.2.0/asterisk-1.2.17-ASA-2007-011.patch,
+ -files/1.2.0/asterisk-1.2.17-ASA-2007-012.patch, asterisk-1.2.17.ebuild:
+ Fix for cvs breaking headers on patches #176170
26 Apr 2007; Gustavo Zacarias <gustavoz@gentoo.org>
asterisk-1.2.17.ebuild:
diff --git a/net-misc/asterisk/asterisk-1.2.17.ebuild b/net-misc/asterisk/asterisk-1.2.17.ebuild
index 60d2b7faf082..5203fff5cff4 100644
--- a/net-misc/asterisk/asterisk-1.2.17.ebuild
+++ b/net-misc/asterisk/asterisk-1.2.17.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.2.17.ebuild,v 1.3 2007/04/26 19:44:30 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.2.17.ebuild,v 1.4 2007/04/26 22:14:26 gustavoz Exp $
inherit eutils multilib toolchain-funcs
@@ -9,7 +9,7 @@ IUSE="alsa bri curl debug doc gtk genericjb h323 hardened lowmem mmx \
elibc_uclibc"
BRI_VERSION="0.3.0-PRE-1y-d"
-AST_PATCHES="1.2.11-patches-1.0"
+AST_PATCHES="1.2.17-patches-1.0"
JB_PATCHES="1.2.11-jb"
## NOTE:
@@ -230,12 +230,6 @@ src_unpack() {
fi
#
- # Security patch bug #175960
- #
- epatch "${FILESDIR}"/1.2.0/${P}-ASA-2007-011.patch
- epatch "${FILESDIR}"/1.2.0/${P}-ASA-2007-012.patch
-
- #
# BRI patches
#
if use bri; then
diff --git a/net-misc/asterisk/files/1.2.0/asterisk-1.2.17-ASA-2007-011.patch b/net-misc/asterisk/files/1.2.0/asterisk-1.2.17-ASA-2007-011.patch
deleted file mode 100644
index 5587de8f747b..000000000000
--- a/net-misc/asterisk/files/1.2.0/asterisk-1.2.17-ASA-2007-011.patch
+++ /dev/null
@@ -1,317 +0,0 @@
---- asterisk-1.2.17/channels/chan_sip.c 2007-03-13 08:45:52.000000000 -0300
-+++ asterisk-1.2.18/channels/chan_sip.c 2007-04-24 13:05:06.000000000 -0300
-@@ -50,7 +50,7 @@
-
- #include "asterisk.h"
-
--ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.1 $")
-+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.1 $")
-
- #include "asterisk/lock.h"
- #include "asterisk/channel.h"
-@@ -4168,7 +4168,8 @@
- add_header(resp, "To", ot);
- copy_header(resp, req, "Call-ID");
- copy_header(resp, req, "CSeq");
-- add_header(resp, "User-Agent", default_useragent);
-+ if (!ast_strlen_zero(default_useragent))
-+ add_header(resp, "User-Agent", default_useragent);
- add_header(resp, "Allow", ALLOWED_METHODS);
- if (msg[0] == '2' && (p->method == SIP_SUBSCRIBE || p->method == SIP_REGISTER)) {
- /* For registration responses, we also need expiry and
-@@ -4281,7 +4282,8 @@
- copy_header(req, orig, "Call-ID");
- add_header(req, "CSeq", tmp);
-
-- add_header(req, "User-Agent", default_useragent);
-+ if (!ast_strlen_zero(default_useragent))
-+ add_header(req, "User-Agent", default_useragent);
- add_header(req, "Max-Forwards", DEFAULT_MAX_FORWARDS);
-
- if (p->rpid)
-@@ -5058,7 +5060,8 @@
- add_header(req, "Contact", p->our_contact);
- add_header(req, "Call-ID", p->callid);
- add_header(req, "CSeq", tmp);
-- add_header(req, "User-Agent", default_useragent);
-+ if (!ast_strlen_zero(default_useragent))
-+ add_header(req, "User-Agent", default_useragent);
- add_header(req, "Max-Forwards", DEFAULT_MAX_FORWARDS);
- if (p->rpid)
- add_header(req, "Remote-Party-ID", p->rpid);
-@@ -5399,7 +5402,7 @@
- add_header(&req, "Subscription-state", "terminated;reason=noresource");
- add_header(&req, "Content-Type", "message/sipfrag;version=2.0");
-
-- strcpy(tmp, "SIP/2.0 200 OK");
-+ strcpy(tmp, "SIP/2.0 200 OK\r\n");
- add_header_contentLength(&req, strlen(tmp));
- add_line(&req, tmp);
-
-@@ -5671,7 +5674,8 @@
- add_header(&req, "To", to);
- add_header(&req, "Call-ID", p->callid);
- add_header(&req, "CSeq", tmp);
-- add_header(&req, "User-Agent", default_useragent);
-+ if (!ast_strlen_zero(default_useragent))
-+ add_header(&req, "User-Agent", default_useragent);
- add_header(&req, "Max-Forwards", DEFAULT_MAX_FORWARDS);
-
-
-@@ -7334,6 +7338,7 @@
- p->noncodeccapability |= AST_RTP_DTMF;
- else
- p->noncodeccapability &= ~AST_RTP_DTMF;
-+ p->jointnoncodeccapability = p->noncodeccapability;
- }
- if (user && debug)
- ast_verbose("Found user '%s'\n", user->name);
-@@ -7443,6 +7448,7 @@
- p->noncodeccapability |= AST_RTP_DTMF;
- else
- p->noncodeccapability &= ~AST_RTP_DTMF;
-+ p->jointnoncodeccapability = p->noncodeccapability;
- }
- ASTOBJ_UNREF(peer,sip_destroy_peer);
- } else {
-@@ -8107,7 +8113,6 @@
- /*! \brief manager_sip_show_peer: Show SIP peers in the manager API ---*/
- static int manager_sip_show_peer( struct mansession *s, struct message *m )
- {
-- char *id = astman_get_header(m,"ActionID");
- char *a[4];
- char *peer;
- int ret;
-@@ -8122,8 +8127,6 @@
- a[2] = "peer";
- a[3] = peer;
-
-- if (!ast_strlen_zero(id))
-- ast_cli(s->fd, "ActionID: %s\r\n",id);
- ret = _sip_show_peer(1, s->fd, s, m, 4, a );
- ast_cli( s->fd, "\r\n\r\n" );
- return ret;
-@@ -8155,9 +8158,13 @@
- load_realtime = (argc == 5 && !strcmp(argv[4], "load")) ? 1 : 0;
- peer = find_peer(argv[3], NULL, load_realtime);
- if (s) { /* Manager */
-- if (peer)
-+ if (peer) {
-+ char *id = astman_get_header(m,"ActionID");
-+
- ast_cli(s->fd, "Response: Success\r\n");
-- else {
-+ if (!ast_strlen_zero(id))
-+ ast_cli(s->fd, "ActionID: %s\r\n",id);
-+ } else {
- snprintf (cbuf, sizeof(cbuf), "Peer %s not found.\n", argv[3]);
- astman_send_error(s, m, cbuf);
- return 0;
-@@ -8264,7 +8271,7 @@
- print_group(fd, peer->pickupgroup, 1);
- ast_cli(fd, "VoiceMailbox: %s\r\n", peer->mailbox);
- ast_cli(fd, "LastMsgsSent: %d\r\n", peer->lastmsgssent);
-- ast_cli(fd, "Call limit: %d\r\n", peer->call_limit);
-+ ast_cli(fd, "Call-limit: %d\r\n", peer->call_limit);
- ast_cli(fd, "Dynamic: %s\r\n", (ast_test_flag(&peer->flags_page2, SIP_PAGE2_DYNAMIC)?"Y":"N"));
- ast_cli(fd, "Callerid: %s\r\n", ast_callerid_merge(cbuf, sizeof(cbuf), peer->cid_name, peer->cid_num, ""));
- ast_cli(fd, "RegExpire: %ld seconds\r\n", ast_sched_when(sched,peer->expire));
-@@ -10196,13 +10203,15 @@
- if ((resp >= 300) && (resp < 700)) {
- if ((option_verbose > 2) && (resp != 487))
- ast_verbose(VERBOSE_PREFIX_3 "Got SIP response %d \"%s\" back from %s\n", resp, rest, ast_inet_ntoa(iabuf, sizeof(iabuf), p->sa.sin_addr));
-- if (p->rtp) {
-- /* Immediately stop RTP */
-- ast_rtp_stop(p->rtp);
-- }
-- if (p->vrtp) {
-- /* Immediately stop VRTP */
-- ast_rtp_stop(p->vrtp);
-+ if (sipmethod == SIP_INVITE) {
-+ if (p->rtp) {
-+ /* Immediately stop RTP */
-+ ast_rtp_stop(p->rtp);
-+ }
-+ if (p->vrtp) {
-+ /* Immediately stop VRTP */
-+ ast_rtp_stop(p->vrtp);
-+ }
- }
- /* XXX Locking issues?? XXX */
- switch(resp) {
-@@ -10246,7 +10255,8 @@
- /* ACK on invite */
- if (sipmethod == SIP_INVITE)
- transmit_request(p, SIP_ACK, seqno, 0, 0);
-- ast_set_flag(p, SIP_ALREADYGONE);
-+ if (sipmethod != SIP_MESSAGE && sipmethod != SIP_INFO)
-+ ast_set_flag(p, SIP_ALREADYGONE);
- if (!p->owner)
- ast_set_flag(p, SIP_NEEDDESTROY);
- } else if ((resp >= 100) && (resp < 200)) {
-@@ -11060,6 +11070,10 @@
- ast_copy_string(p->context, p->subscribecontext, sizeof(p->context));
- else if (ast_strlen_zero(p->context))
- strcpy(p->context, default_context);
-+
-+ /* Get full contact header - this needs to be used as a request URI in NOTIFY's */
-+ parse_ok_contact(p, req);
-+
- /* Get destination right away */
- build_contact(p);
- if (gotdest) {
-@@ -11295,16 +11309,16 @@
- /* ignore means "don't do anything with it" but still have to
- respond appropriately */
- ignore=1;
-- }
--
-- e = ast_skip_blanks(e);
-- if (sscanf(e, "%d %n", &respid, &len) != 1) {
-- ast_log(LOG_WARNING, "Invalid response: '%s'\n", e);
-- } else {
-- /* More SIP ridiculousness, we have to ignore bogus contacts in 100 etc responses */
-- if ((respid == 200) || ((respid >= 300) && (respid <= 399)))
-- extract_uri(p, req);
-- handle_response(p, respid, e + len, req, ignore, seqno);
-+ } else if (e) {
-+ e = ast_skip_blanks(e);
-+ if (sscanf(e, "%d %n", &respid, &len) != 1) {
-+ ast_log(LOG_WARNING, "Invalid response: '%s'\n", e);
-+ } else {
-+ /* More SIP ridiculousness, we have to ignore bogus contacts in 100 etc responses */
-+ if ((respid == 200) || ((respid >= 300) && (respid <= 399)))
-+ extract_uri(p, req);
-+ handle_response(p, respid, e + len, req, ignore, seqno);
-+ }
- }
- return 0;
- }
-@@ -11496,17 +11510,20 @@
- /* Go ahead and lock the owner if it has one -- we may need it */
- if (p->owner && ast_mutex_trylock(&p->owner->lock)) {
- ast_log(LOG_DEBUG, "Failed to grab lock, trying again...\n");
-- ast_mutex_unlock(&p->lock);
-- ast_mutex_unlock(&netlock);
-- /* Sleep for a very short amount of time */
-- usleep(1);
-- if (--lockretry)
-+ if (--lockretry) {
-+ ast_mutex_unlock(&p->lock);
-+ ast_mutex_unlock(&netlock);
-+ usleep(1);
- goto retrylock;
-+ }
- }
- if (!lockretry) {
-- ast_log(LOG_ERROR, "We could NOT get the channel lock for %s - Call ID %s! \n", p->owner->name, p->callid);
-+ if (p->owner)
-+ ast_log(LOG_ERROR, "We could NOT get the channel lock for %s - Call ID %s! \n", p->owner->name, p->callid);
- ast_log(LOG_ERROR, "SIP MESSAGE JUST IGNORED: %s \n", req.data);
- ast_log(LOG_ERROR, "BAD! BAD! BAD!\n");
-+ ast_mutex_unlock(&p->lock);
-+ ast_mutex_unlock(&netlock);
- return 1;
- }
- memcpy(&p->recv, &sin, sizeof(p->recv));
-@@ -11986,20 +12003,17 @@
- /*! \brief handle_common_options: Handle flag-type options common to users and peers ---*/
- static int handle_common_options(struct ast_flags *flags, struct ast_flags *mask, struct ast_variable *v)
- {
-- int res = 0;
-+ int res = 1;
-
- if (!strcasecmp(v->name, "trustrpid")) {
- ast_set_flag(mask, SIP_TRUSTRPID);
- ast_set2_flag(flags, ast_true(v->value), SIP_TRUSTRPID);
-- res = 1;
- } else if (!strcasecmp(v->name, "sendrpid")) {
- ast_set_flag(mask, SIP_SENDRPID);
- ast_set2_flag(flags, ast_true(v->value), SIP_SENDRPID);
-- res = 1;
- } else if (!strcasecmp(v->name, "useclientcode")) {
- ast_set_flag(mask, SIP_USECLIENTCODE);
- ast_set2_flag(flags, ast_true(v->value), SIP_USECLIENTCODE);
-- res = 1;
- } else if (!strcasecmp(v->name, "dtmfmode")) {
- ast_set_flag(mask, SIP_DTMF);
- ast_clear_flag(flags, SIP_DTMF);
-@@ -12086,8 +12100,8 @@
- } else if (!strcasecmp(v->name, "promiscredir")) {
- ast_set_flag(mask, SIP_PROMISCREDIR);
- ast_set2_flag(flags, ast_true(v->value), SIP_PROMISCREDIR);
-- res = 1;
-- }
-+ } else
-+ res = 0;
-
- return res;
- }
-@@ -12344,9 +12358,9 @@
- if (user->callingpres == -1)
- user->callingpres = atoi(v->value);
- }
-- /*else if (strcasecmp(v->name,"type"))
-- * ast_log(LOG_WARNING, "Ignoring %s\n", v->name);
-- */
-+ /* We can't just report unknown options here because this may be a
-+ * type=friend entry. All user options are valid for a peer, but not
-+ * the other way around. */
- v = v->next;
- }
- ast_copy_flags(user, &userflags, mask.flags);
-@@ -12414,7 +12428,7 @@
-
- if (peer) {
- /* Already in the list, remove it and it will be added back (or FREE'd) */
-- found++;
-+ found = 1;
- } else {
- peer = malloc(sizeof(*peer));
- if (peer) {
-@@ -12513,10 +12527,9 @@
- ast_log(LOG_WARNING, "You can't have a dynamic outbound proxy, you big silly head at line %d.\n", v->lineno);
- } else {
- /* They'll register with us */
-- ast_set_flag(&peer->flags_page2, SIP_PAGE2_DYNAMIC);
-- if (!found) {
-- /* Initialize stuff iff we're not found, otherwise
-- we keep going with what we had */
-+ if (!found || !ast_test_flag(&peer->flags_page2, SIP_PAGE2_DYNAMIC)) {
-+ /* Initialize stuff if this is a new peer, or if it used to be
-+ * non-dynamic before the reload. */
- memset(&peer->addr.sin_addr, 0, 4);
- if (peer->addr.sin_port) {
- /* If we've already got a port, make it the default rather than absolute */
-@@ -12524,6 +12537,7 @@
- peer->addr.sin_port = 0;
- }
- }
-+ ast_set_flag(&peer->flags_page2, SIP_PAGE2_DYNAMIC);
- }
- } else {
- /* Non-dynamic. Make sure we become that way if we're not */
-@@ -12630,10 +12644,7 @@
- peer->maxms = 0;
- }
- }
-- /* else if (strcasecmp(v->name,"type"))
-- * ast_log(LOG_WARNING, "Ignoring %s\n", v->name);
-- */
-- v=v->next;
-+ v = v->next;
- }
- if (!ast_test_flag((&global_flags_page2), SIP_PAGE2_IGNOREREGEXPIRE) && ast_test_flag(&peer->flags_page2, SIP_PAGE2_DYNAMIC) && realtime) {
- time_t nowtime;
-@@ -12929,10 +12940,7 @@
- } else if (!strcasecmp(v->name, "callevents")) {
- callevents = ast_true(v->value);
- }
-- /* else if (strcasecmp(v->name,"type"))
-- * ast_log(LOG_WARNING, "Ignoring %s\n", v->name);
-- */
-- v = v->next;
-+ v = v->next;
- }
-
- if (!allow_external_domains && AST_LIST_EMPTY(&domain_list)) {
diff --git a/net-misc/asterisk/files/1.2.0/asterisk-1.2.17-ASA-2007-012.patch b/net-misc/asterisk/files/1.2.0/asterisk-1.2.17-ASA-2007-012.patch
deleted file mode 100644
index 57b1ed8eb6e3..000000000000
--- a/net-misc/asterisk/files/1.2.0/asterisk-1.2.17-ASA-2007-012.patch
+++ /dev/null
@@ -1,41 +0,0 @@
---- asterisk-1.2.17/manager.c 2007-03-06 21:27:04.000000000 -0300
-+++ asterisk-1.2.18/manager.c 2007-04-24 18:33:59.000000000 -0300
-@@ -46,7 +46,7 @@
-
- #include "asterisk.h"
-
--ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.1 $")
-+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.1 $")
-
- #include "asterisk/channel.h"
- #include "asterisk/file.h"
-@@ -533,7 +533,8 @@
- } else if (ha)
- ast_free_ha(ha);
- if (!strcasecmp(authtype, "MD5")) {
-- if (!ast_strlen_zero(key) && s->challenge) {
-+ if (!ast_strlen_zero(key) &&
-+ !ast_strlen_zero(s->challenge) && !ast_strlen_zero(password)) {
- int x;
- int len=0;
- char md5key[256] = "";
-@@ -885,15 +886,15 @@
- astman_send_error(s, m, buf);
- return 0;
- }
-- if (chan->_state != AST_STATE_UP) {
-- astman_send_error(s, m, "Redirect failed, channel not up.\n");
-+ if (ast_check_hangup(chan)) {
-+ astman_send_error(s, m, "Redirect failed, channel hung up.\n");
- ast_mutex_unlock(&chan->lock);
- return 0;
- }
- if (!ast_strlen_zero(name2))
- chan2 = ast_get_channel_by_name_locked(name2);
-- if (chan2 && chan2->_state != AST_STATE_UP) {
-- astman_send_error(s, m, "Redirect failed, extra channel not up.\n");
-+ if (chan2 && ast_check_hangup(chan2)) {
-+ astman_send_error(s, m, "Redirect failed, extra channel hung up.\n");
- ast_mutex_unlock(&chan->lock);
- ast_mutex_unlock(&chan2->lock);
- return 0;
diff --git a/net-misc/asterisk/files/digest-asterisk-1.2.17 b/net-misc/asterisk/files/digest-asterisk-1.2.17
index 6ab4a0a6d76f..e5cc866742b3 100644
--- a/net-misc/asterisk/files/digest-asterisk-1.2.17
+++ b/net-misc/asterisk/files/digest-asterisk-1.2.17
@@ -1,12 +1,12 @@
MD5 a407d1ef9bc88e38f435581380975fec asterisk-1.2.11-jb.patch.bz2 15598
RMD160 cbf4a95e25bf03a41ebef2a726419299494bb298 asterisk-1.2.11-jb.patch.bz2 15598
SHA256 e85e438cb88993a188d063582f38eff0efc1b727e47d9f71809ee81d19992946 asterisk-1.2.11-jb.patch.bz2 15598
-MD5 c91195d62d39cf71da31122dd8157828 asterisk-1.2.11-patches-1.0.tar.bz2 7432
-RMD160 b840a16b6ae9ffb1e76da4a7a8129916e1710204 asterisk-1.2.11-patches-1.0.tar.bz2 7432
-SHA256 46d198be655b35383725dde72ed82ecc7767b8009356f88d27c763323d1cdaa8 asterisk-1.2.11-patches-1.0.tar.bz2 7432
MD5 71c3819b253f9790bd750c8aa5fb4d9a asterisk-1.2.17-bristuff-0.3.0-PRE-1y-d-2.diff.bz2 97765
RMD160 77261589822482fefac9ea42ff24dd8d5f858243 asterisk-1.2.17-bristuff-0.3.0-PRE-1y-d-2.diff.bz2 97765
SHA256 f7afdd84b634c29f6988b39afb4dd52c0c55b2e3b3772551f8d7b2d63817b5d0 asterisk-1.2.17-bristuff-0.3.0-PRE-1y-d-2.diff.bz2 97765
+MD5 82ff76f4d82a6ee357d39e8432d55cbc asterisk-1.2.17-patches-1.0.tar.bz2 11420
+RMD160 2750b7392f75166c7e53fc3204c47e82138a2b45 asterisk-1.2.17-patches-1.0.tar.bz2 11420
+SHA256 731eabe9244d271a5d186c6aad64c2472c236bb99ee5850a3dec17e9275e699c asterisk-1.2.17-patches-1.0.tar.bz2 11420
MD5 1a41a1f4a535813b1272bae0545c7990 asterisk-1.2.17.tar.gz 10615354
RMD160 f03fe30312c7e693c4804c40941db942ab092976 asterisk-1.2.17.tar.gz 10615354
SHA256 ab20ada37e0f2874a0c59ac7d5395c5980419da6344cbb78b60874e9b8631cf1 asterisk-1.2.17.tar.gz 10615354