pkgsrc/comms/asterisk/patches/patch-apps_app__queue.c
jnemeth 02c7ae5c00 Update to Asterisk 11.11.0: this is primarily a bugfix release.
pkgsrc change: MAKE_JOBS_SAFE=NO from joerg@

The Asterisk Development Team has announced the release of Asterisk 11.11.0.

The release of Asterisk 11.11.0 resolves several issues reported by the
community and would have not been possible without your participation.
Thank you!

The following are the issues resolved in this release:

Bugs fixed in this release:
-----------------------------------
 * ASTERISK-22551 - Session timer : UAS (Asterisk) starts counting
      at Invite, UAC starts counting at 200 OK. (Reported by i2045)
 * ASTERISK-23792 - Mutex left locked in chan_unistim.c (Reported
      by Peter Whisker)
 * ASTERISK-23582 - [patch]Inconsistent column length in *odbc
      (Reported by Walter Doekes)
 * ASTERISK-23803 - AMI action UpdateConfig EmptyCat clears all
      categories but the requested one (Reported by zvision)
 * ASTERISK-23035 - ConfBridge with name longer than max (32 chars)
      results in several bridges with same conf_name (Reported by
      Iñaki Cívico)
 * ASTERISK-23824 - ConfBridge: Users cannot be muted via CLI or
      AMI when waiting to enter a conference (Reported by Matt Jordan)
 * ASTERISK-23683 - #includes - wildcard character in a path more
      than one directory deep - results in no config parsing on module
      reload (Reported by tootai)
 * ASTERISK-23827 - autoservice thread doesn't exit at shutdown
      (Reported by Corey Farrell)
 * ASTERISK-23609 - Security: AMI action MixMonitor allows
      arbitrary programs to be run (Reported by Corey Farrell)
 * ASTERISK-23673 - Security: DOS by consuming the number of
      allowed HTTP connections. (Reported by Richard Mudgett)
 * ASTERISK-23246 - DEBUG messages in sdp_crypto.c display despite
      a DEBUG level of zero (Reported by Rusty Newton)
 * ASTERISK-23766 - [patch] Specify timeout for database write in
      SQLite (Reported by Igor Goncharovsky)
 * ASTERISK-23844 - Load of pbx_lua fails on sample extensions.lua
      with Lua 5.2 or greater due to addition of goto statement
      (Reported by Rusty Newton)
 * ASTERISK-23818 - PBX_Lua: after asterisk startup module is
      loaded, but dialplan not available (Reported by Dennis Guse)
 * ASTERISK-23834 - res_rtp_asterisk debug message gives wrong
      length if ICE (Reported by Richard Kenner)
 * ASTERISK-23790 - [patch] - SIP From headers longer than 256
      characters result in dropped call and 'No closing bracket'
      warnings. (Reported by uniken1)
 * ASTERISK-23917 - res_http_websocket: Delay in client processing
      large streams of data causes disconnect and stuck socket
      (Reported by Matt Jordan)
 * ASTERISK-23908 - [patch]When using FEC error correction,
      asterisk tries considers negative sequence numbers as missing
      (Reported by Torrey Searle)
 * ASTERISK-23921 - refcounter.py uses excessive ram for large refs
      files  (Reported by Corey Farrell)
 * ASTERISK-23948 - REF_DEBUG fails to record ao2_ref against
      objects that were already freed (Reported by Corey Farrell)
 * ASTERISK-23916 - [patch]SIP/SDP fmtp line may include whitespace
      between attributes (Reported by Alexander Traud)
 * ASTERISK-23984 - Infinite loop possible in ast_careful_fwrite()
      (Reported by Steve Davies)
 * ASTERISK-23897 - [patch]Change in SETUP ACK handling (checking
      PI) in revision 413765 breaks working environments (Reported by
      Pavel Troller)

Improvements made in this release:
-----------------------------------
 * ASTERISK-23492 - Add option to safe_asterisk to disable
      backgrounding (Reported by Walter Doekes)
 * ASTERISK-22961 - [patch] DTLS-SRTP not working with SHA-256
      (Reported by Jay Jideliov)

For a full list of changes in this release, please see the ChangeLog:

http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-11.11.0

Thank you for your continued support of Asterisk!
2014-07-29 04:20:55 +00:00

174 lines
9.5 KiB
C

$NetBSD: patch-apps_app__queue.c,v 1.4 2014/07/29 04:20:55 jnemeth Exp $
--- apps/app_queue.c.orig 2014-06-12 15:40:41.000000000 +0000
+++ apps/app_queue.c
@@ -4045,8 +4045,8 @@ static void record_abandoned(struct queu
"Uniqueid: %s\r\n"
"Position: %d\r\n"
"OriginalPosition: %d\r\n"
- "HoldTime: %d\r\n",
- qe->parent->name, ast_channel_uniqueid(qe->chan), qe->pos, qe->opos, (int)(time(NULL) - qe->start));
+ "HoldTime: %jd\r\n",
+ qe->parent->name, ast_channel_uniqueid(qe->chan), qe->pos, qe->opos, (intmax_t)(time(NULL) - qe->start));
qe->parent->callsabandoned++;
ao2_unlock(qe->parent);
@@ -4818,7 +4818,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;
- ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
+ ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), "NONE", "EXITEMPTY", "%d|%d|%jd", qe->pos, qe->opos, (intmax_t) time(NULL) - qe->start);
leave_queue(qe);
break;
}
@@ -5058,12 +5058,12 @@ static void send_agent_complete(const st
"Channel: %s\r\n"
"Member: %s\r\n"
"MemberName: %s\r\n"
- "HoldTime: %ld\r\n"
- "TalkTime: %ld\r\n"
+ "HoldTime: %jd\r\n"
+ "TalkTime: %jd\r\n"
"Reason: %s\r\n"
"%s",
queuename, ast_channel_uniqueid(qe->chan), ast_channel_name(peer), member->interface, member->membername,
- (long)(callstart - qe->start), (long)(time(NULL) - callstart), reason,
+ (intmax_t)(callstart - qe->start), (intmax_t)(time(NULL) - callstart), reason,
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, vars_len) : "");
}
@@ -5106,9 +5106,9 @@ static void queue_transfer_fixup(void *d
int callcompletedinsl = qtds->callcompletedinsl;
struct ast_datastore *datastore;
- ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), member->membername, "TRANSFER", "%s|%s|%ld|%ld|%d",
- ast_channel_exten(new_chan), ast_channel_context(new_chan), (long) (callstart - qe->start),
- (long) (time(NULL) - callstart), qe->opos);
+ ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), member->membername, "TRANSFER", "%s|%s|%jd|%jd|%d",
+ ast_channel_exten(new_chan), ast_channel_context(new_chan), (intmax_t) (callstart - qe->start),
+ (intmax_t) (time(NULL) - callstart), qe->opos);
update_queue(qe->parent, member, callcompletedinsl, (time(NULL) - callstart));
@@ -5625,7 +5625,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));
- ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
+ ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "ABANDON", "%d|%d|%jd", qe->pos, qe->opos, (intmax_t) time(NULL) - qe->start);
record_abandoned(qe);
ast_autoservice_chan_hangup_peer(qe->chan, peer);
ao2_ref(member, -1);
@@ -5674,8 +5674,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) {
- snprintf(interfacevar, sizeof(interfacevar), "QEHOLDTIME=%ld,QEORIGINALPOS=%d",
- (long) time(NULL) - qe->start, qe->opos);
+ snprintf(interfacevar, sizeof(interfacevar), "QEHOLDTIME=%jd,QEORIGINALPOS=%d",
+ (intmax_t) time(NULL) - qe->start, qe->opos);
pbx_builtin_setvar_multiple(qe->chan, interfacevar);
pbx_builtin_setvar_multiple(peer, interfacevar);
}
@@ -5892,8 +5892,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;
@@ -5947,12 +5947,12 @@ static int try_calling(struct queue_ent
"Channel: %s\r\n"
"Member: %s\r\n"
"MemberName: %s\r\n"
- "HoldTime: %ld\r\n"
+ "HoldTime: %jd\r\n"
"BridgedChannel: %s\r\n"
- "RingTime: %ld\r\n"
+ "RingTime: %jd\r\n"
"%s",
queuename, ast_channel_uniqueid(qe->chan), ast_channel_name(peer), member->interface, member->membername,
- (long) time(NULL) - qe->start, ast_channel_uniqueid(peer), (long)(orig - to > 0 ? (orig - to) / 1000 : 0),
+ (intmax_t) time(NULL) - qe->start, ast_channel_uniqueid(peer), (intmax_t)(orig - to > 0 ? (orig - to) / 1000 : 0),
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));
@@ -5984,17 +5984,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)))) {
- ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "TRANSFER", "%s|%s|%ld|%ld|%d",
- ast_channel_exten(qe->chan), ast_channel_context(qe->chan), (long) (callstart - qe->start),
- (long) (time(NULL) - callstart), qe->opos);
+ ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "TRANSFER", "%s|%s|%jd|%jd|%d",
+ ast_channel_exten(qe->chan), ast_channel_context(qe->chan), (intmax_t) (callstart - qe->start),
+ (intmax_t) (time(NULL) - callstart), qe->opos);
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), TRANSFER);
} else if (ast_check_hangup(qe->chan) && !ast_check_hangup(peer)) {
- ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "COMPLETECALLER", "%ld|%ld|%d",
- (long) (callstart - qe->start), (long) (time(NULL) - callstart), qe->opos);
+ ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "COMPLETECALLER", "%jd|%jd|%d",
+ (intmax_t) (callstart - qe->start), (intmax_t) (time(NULL) - callstart), qe->opos);
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), CALLER);
} else {
- ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "COMPLETEAGENT", "%ld|%ld|%d",
- (long) (callstart - qe->start), (long) (time(NULL) - callstart), qe->opos);
+ ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "COMPLETEAGENT", "%jd|%jd|%d",
+ (intmax_t) (callstart - qe->start), (intmax_t) (time(NULL) - callstart), qe->opos);
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), AGENT);
}
if ((tds = ast_channel_datastore_find(qe->chan, &queue_transfer_info, NULL))) {
@@ -7174,8 +7174,8 @@ check_turns:
record_abandoned(&qe);
reason = QUEUE_TIMEOUT;
res = 0;
- ast_queue_log(args.queuename, ast_channel_uniqueid(chan),"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld",
- qe.pos, qe.opos, (long) time(NULL) - qe.start);
+ ast_queue_log(args.queuename, ast_channel_uniqueid(chan),"NONE", "EXITWITHTIMEOUT", "%d|%d|%jd",
+ qe.pos, qe.opos, (intmax_t) time(NULL) - qe.start);
break;
}
@@ -7219,7 +7219,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;
- ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITEMPTY", "%d|%d|%ld", qe.pos, qe.opos, (long)(time(NULL) - qe.start));
+ ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITEMPTY", "%d|%d|%jd", qe.pos, qe.opos, (intmax_t)(time(NULL) - qe.start));
res = 0;
break;
}
@@ -7241,7 +7241,7 @@ check_turns:
record_abandoned(&qe);
reason = QUEUE_TIMEOUT;
res = 0;
- ast_queue_log(qe.parent->name, ast_channel_uniqueid(qe.chan),"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld", qe.pos, qe.opos, (long) time(NULL) - qe.start);
+ ast_queue_log(qe.parent->name, ast_channel_uniqueid(qe.chan),"NONE", "EXITWITHTIMEOUT", "%d|%d|%jd", qe.pos, qe.opos, (intmax_t) time(NULL) - qe.start);
break;
}
@@ -7269,8 +7269,8 @@ stop:
if (!qe.handled) {
record_abandoned(&qe);
ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "ABANDON",
- "%d|%d|%ld", qe.pos, qe.opos,
- (long) time(NULL) - qe.start);
+ "%d|%d|%jd", qe.pos, qe.opos,
+ (intmax_t) time(NULL) - qe.start);
res = -1;
} else if (qcontinue) {
reason = QUEUE_CONTINUE;
@@ -7278,7 +7278,7 @@ stop:
}
} else if (qe.valid_digits) {
ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITWITHKEY",
- "%s|%d|%d|%ld", qe.digits, qe.pos, qe.opos, (long) time(NULL) - qe.start);
+ "%s|%d|%d|%jd", qe.digits, qe.pos, qe.opos, (intmax_t) time(NULL) - qe.start);
}
}