[asterisk-commits] qwell: branch 1.6.0 r114541 - in /branches/1.6.0: ./ apps/ include/asterisk/ ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Apr 22 13:14:44 CDT 2008
Author: qwell
Date: Tue Apr 22 13:14:44 2008
New Revision: 114541
URL: http://svn.digium.com/view/asterisk?view=rev&rev=114541
Log:
Merged revisions 114540 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r114540 | qwell | 2008-04-22 13:14:09 -0500 (Tue, 22 Apr 2008) | 8 lines
Allow setqueuevar=yes (et al) to work, after changes to pbx_builtin_setvar()
(closes issue #12490)
Reported by: bcnit
Patches:
12490-queuevars-3.diff uploaded by qwell (license 4)
Tested by: qwell
........
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/apps/app_queue.c
branches/1.6.0/include/asterisk/pbx.h
branches/1.6.0/main/pbx.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/apps/app_queue.c?view=diff&rev=114541&r1=114540&r2=114541
==============================================================================
--- branches/1.6.0/apps/app_queue.c (original)
+++ branches/1.6.0/apps/app_queue.c Tue Apr 22 13:14:44 2008
@@ -587,11 +587,11 @@
sl = 100 * ((float) qe->parent->callscompletedinsl / (float) qe->parent->callscompleted);
snprintf(interfacevar, sizeof(interfacevar),
- "QUEUENAME=%s|QUEUEMAX=%d|QUEUESTRATEGY=%s|QUEUECALLS=%d|QUEUEHOLDTIME=%d|QUEUECOMPLETED=%d|QUEUEABANDONED=%d|QUEUESRVLEVEL=%d|QUEUESRVLEVELPERF=%2.1f",
+ "QUEUENAME=%s,QUEUEMAX=%d,QUEUESTRATEGY=%s,QUEUECALLS=%d,QUEUEHOLDTIME=%d,QUEUECOMPLETED=%d,QUEUEABANDONED=%d,QUEUESRVLEVEL=%d,QUEUESRVLEVELPERF=%2.1f",
qe->parent->name, qe->parent->maxlen, int2strat(qe->parent->strategy), qe->parent->count, qe->parent->holdtime, qe->parent->callscompleted,
qe->parent->callsabandoned, qe->parent->servicelevel, sl);
- pbx_builtin_setvar(qe->chan, interfacevar);
+ pbx_builtin_setvar_multiple(qe->chan, interfacevar);
}
}
@@ -3386,17 +3386,17 @@
/* 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) {
- snprintf(interfacevar, sizeof(interfacevar), "MEMBERINTERFACE=%s|MEMBERNAME=%s|MEMBERCALLS=%d|MEMBERLASTCALL=%ld|MEMBERPENALTY=%d|MEMBERDYNAMIC=%d|MEMBERREALTIME=%d",
+ snprintf(interfacevar, sizeof(interfacevar), "MEMBERINTERFACE=%s,MEMBERNAME=%s,MEMBERCALLS=%d,MEMBERLASTCALL=%ld,MEMBERPENALTY=%d,MEMBERDYNAMIC=%d,MEMBERREALTIME=%d",
member->interface, member->membername, member->calls, (long)member->lastcall, member->penalty, member->dynamic, member->realtime);
- pbx_builtin_setvar(qe->chan, interfacevar);
+ pbx_builtin_setvar_multiple(qe->chan, interfacevar);
}
/* 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",
+ snprintf(interfacevar, sizeof(interfacevar), "QEHOLDTIME=%ld,QEORIGINALPOS=%d",
(long) time(NULL) - qe->start, qe->opos);
- pbx_builtin_setvar(qe->chan, interfacevar);
+ pbx_builtin_setvar_multiple(qe->chan, interfacevar);
}
/* try to set queue variables if configured to do so*/
@@ -4650,10 +4650,10 @@
sl = 100 * ((float) q->callscompletedinsl / (float) q->callscompleted);
snprintf(interfacevar, sizeof(interfacevar),
- "QUEUEMAX=%d|QUEUESTRATEGY=%s|QUEUECALLS=%d|QUEUEHOLDTIME=%d|QUEUECOMPLETED=%d|QUEUEABANDONED=%d|QUEUESRVLEVEL=%d|QUEUESRVLEVELPERF=%2.1f",
+ "QUEUEMAX=%d,QUEUESTRATEGY=%s,QUEUECALLS=%d,QUEUEHOLDTIME=%d,QUEUECOMPLETED=%d,QUEUEABANDONED=%d,QUEUESRVLEVEL=%d,QUEUESRVLEVELPERF=%2.1f",
q->maxlen, int2strat(q->strategy), q->count, q->holdtime, q->callscompleted, q->callsabandoned, q->servicelevel, sl);
- pbx_builtin_setvar(chan, interfacevar);
+ pbx_builtin_setvar_multiple(chan, interfacevar);
}
ao2_unlock(q);
Modified: branches/1.6.0/include/asterisk/pbx.h
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/include/asterisk/pbx.h?view=diff&rev=114541&r1=114540&r2=114541
==============================================================================
--- branches/1.6.0/include/asterisk/pbx.h (original)
+++ branches/1.6.0/include/asterisk/pbx.h Tue Apr 22 13:14:44 2008
@@ -843,6 +843,7 @@
* \note Will lock the channel.
*/
int pbx_builtin_setvar(struct ast_channel *chan, void *data);
+int pbx_builtin_setvar_multiple(struct ast_channel *chan, void *data);
int pbx_builtin_raise_exception(struct ast_channel *chan, void *data);
Modified: branches/1.6.0/main/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/pbx.c?view=diff&rev=114541&r1=114540&r2=114541
==============================================================================
--- branches/1.6.0/main/pbx.c (original)
+++ branches/1.6.0/main/pbx.c Tue Apr 22 13:14:44 2008
@@ -318,7 +318,7 @@
static int matchcid(const char *cidpattern, const char *callerid);
int pbx_builtin_setvar(struct ast_channel *, void *);
void log_match_char_tree(struct match_char *node, char *prefix); /* for use anywhere */
-static int pbx_builtin_setvar_multiple(struct ast_channel *, void *);
+int pbx_builtin_setvar_multiple(struct ast_channel *, void *);
static int pbx_builtin_importvar(struct ast_channel *, void *);
static void set_ext_pri(struct ast_channel *c, const char *exten, int pri);
static void new_find_extension(const char *str, struct scoreboard *score, struct match_char *tree, int length, int spec, const char *callerid, enum ext_match_t action);
@@ -7560,7 +7560,7 @@
return(0);
}
-static int pbx_builtin_setvar_multiple(struct ast_channel *chan, void *vdata)
+int pbx_builtin_setvar_multiple(struct ast_channel *chan, void *vdata)
{
char *data;
int x;
More information about the asterisk-commits
mailing list