summaryrefslogtreecommitdiff
path: root/comms/asterisk16/patches/patch-ax
diff options
context:
space:
mode:
Diffstat (limited to 'comms/asterisk16/patches/patch-ax')
-rw-r--r--comms/asterisk16/patches/patch-ax104
1 files changed, 104 insertions, 0 deletions
diff --git a/comms/asterisk16/patches/patch-ax b/comms/asterisk16/patches/patch-ax
new file mode 100644
index 00000000000..99b1cfd6725
--- /dev/null
+++ b/comms/asterisk16/patches/patch-ax
@@ -0,0 +1,104 @@
+$NetBSD: patch-ax,v 1.1.1.1 2009/06/12 09:04:57 jnemeth Exp $
+
+--- apps/app_queue.c.orig 2009-02-11 15:04:10.000000000 -0800
++++ apps/app_queue.c
+@@ -2880,7 +2880,7 @@ static int wait_our_turn(struct queue_en
+
+ if (qe->parent->leavewhenempty && (stat == QUEUE_NO_MEMBERS)) {
+ *reason = QUEUE_LEAVEEMPTY;
+- ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
++ ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%jd", qe->pos, qe->opos, (intmax_t) time(NULL) - qe->start);
+ leave_queue(qe);
+ break;
+ }
+@@ -2888,13 +2888,13 @@ static int wait_our_turn(struct queue_en
+ /* leave the queue if no reachable agents, if enabled */
+ if ((qe->parent->leavewhenempty == QUEUE_EMPTY_STRICT) && (stat == QUEUE_NO_REACHABLE_MEMBERS || stat == QUEUE_NO_UNPAUSED_REACHABLE_MEMBERS)) {
+ *reason = QUEUE_LEAVEUNAVAIL;
+- ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
++ ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%jd", qe->pos, qe->opos, (intmax_t) time(NULL) - qe->start);
+ leave_queue(qe);
+ break;
+ }
+ if ((qe->parent->leavewhenempty == QUEUE_EMPTY_LOOSE) && (stat == QUEUE_NO_REACHABLE_MEMBERS)) {
+ *reason = QUEUE_LEAVEUNAVAIL;
+- ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
++ ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%jd", qe->pos, qe->opos, (intmax_t) time(NULL) - qe->start);
+ leave_queue(qe);
+ break;
+ }
+@@ -3587,7 +3587,7 @@ static int try_calling(struct queue_ent
+ } else if (res2) {
+ /* 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", peer->name);
+- ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
++ ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "ABANDON", "%d|%d|%jd", qe->pos, qe->opos, (intmax_t) time(NULL) - qe->start);
+ record_abandoned(qe);
+ ast_hangup(peer);
+ ao2_ref(member, -1);
+@@ -3631,8 +3631,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);
+ }
+
+@@ -3872,7 +3872,7 @@ static int try_calling(struct queue_ent
+ ast_log(LOG_WARNING, "Asked to execute an AGI on this channel, but could not find application (agi)!\n");
+ }
+ qe->handled++;
+- ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "CONNECT", "%ld|%s|%ld", (long) time(NULL) - qe->start, peer->uniqueid,
++ ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "CONNECT", "%jd|%s|%ld", (intmax_t) time(NULL) - qe->start, peer->uniqueid,
+ (long)(orig - to > 0 ? (orig - to) / 1000 : 0));
+ if (update_cdr && qe->chan->cdr)
+ ast_copy_string(qe->chan->cdr->dstchannel, member->membername, sizeof(qe->chan->cdr->dstchannel));
+@@ -3883,12 +3883,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"
+ "%s",
+ queuename, qe->chan->uniqueid, peer->name, member->interface, member->membername,
+- (long) time(NULL) - qe->start, peer->uniqueid, (long)(orig - to > 0 ? (orig - to) / 1000 : 0),
++ (intmax_t) time(NULL) - qe->start, peer->uniqueid, (long)(orig - to > 0 ? (orig - to) / 1000 : 0),
+ qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
+ ast_copy_string(oldcontext, qe->chan->context, sizeof(oldcontext));
+ ast_copy_string(oldexten, qe->chan->exten, sizeof(oldexten));
+@@ -4770,8 +4770,8 @@ check_turns:
+ record_abandoned(&qe);
+ reason = QUEUE_TIMEOUT;
+ res = 0;
+- ast_queue_log(args.queuename, chan->uniqueid,"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld",
+- qe.pos, qe.opos, (long) time(NULL) - qe.start);
++ ast_queue_log(args.queuename, chan->uniqueid,"NONE", "EXITWITHTIMEOUT", "%d|%d|%jd",
++ qe.pos, qe.opos, (intmax_t) time(NULL) - qe.start);
+ break;
+ }
+
+@@ -4863,7 +4863,7 @@ check_turns:
+ record_abandoned(&qe);
+ reason = QUEUE_TIMEOUT;
+ res = 0;
+- ast_queue_log(qe.parent->name, qe.chan->uniqueid,"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld", qe.pos, qe.opos, (long) time(NULL) - qe.start);
++ ast_queue_log(qe.parent->name, qe.chan->uniqueid,"NONE", "EXITWITHTIMEOUT", "%d|%d|%jd", qe.pos, qe.opos, (intmax_t) time(NULL) - qe.start);
+ break;
+ }
+
+@@ -4890,8 +4890,8 @@ stop:
+ if (!qe.handled) {
+ record_abandoned(&qe);
+ ast_queue_log(args.queuename, chan->uniqueid, "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;