[Asterisk-cvs] asterisk ChangeLog,1.57,1.58 manager.c,1.131,1.132
kpfleming
kpfleming
Mon Nov 7 21:20:37 CST 2005
- Previous message: [Asterisk-cvs]
asterisk/pbx pbx_ael.c, 1.16, 1.17 pbx_dundi.c, 1.47,
1.48 pbx_loopback.c, 1.10, 1.11 pbx_realtime.c, 1.13, 1.14
- Next message: [Asterisk-cvs] asterisk ChangeLog,1.58,1.59 say.c,1.73,1.74
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv14858
Modified Files:
ChangeLog manager.c
Log Message:
issue #5585
Index: ChangeLog
===================================================================
RCS file: /usr/cvsroot/asterisk/ChangeLog,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- ChangeLog 8 Nov 2005 01:55:30 -0000 1.57
+++ ChangeLog 8 Nov 2005 02:11:42 -0000 1.58
@@ -1,5 +1,7 @@
2005-11-07 Kevin P. Fleming <kpfleming at digium.com>
+ * manager.c (astman_get_variables): restore old multiple-variable behavior for "Variable" header (issue #5585)
+
* many files: don't check for NULL before calling ast_strlen_zero, it can do it itself (issue #5648)
* pbx.c (handle_show_hints): use proper state-to-string function for hint state (issue #5583)
Index: manager.c
===================================================================
RCS file: /usr/cvsroot/asterisk/manager.c,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -d -r1.131 -r1.132
--- manager.c 26 Oct 2005 23:11:36 -0000 1.131
+++ manager.c 8 Nov 2005 02:11:42 -0000 1.132
@@ -309,26 +309,34 @@
struct ast_variable *astman_get_variables(struct message *m)
{
- int varlen, x;
+ int varlen, x, y;
struct ast_variable *head = NULL, *cur;
char *var, *val;
+ unsigned int var_count;
+ char *vars[32];
varlen = strlen("Variable: ");
for (x = 0; x < m->hdrcount; x++) {
- if (!strncasecmp("Variable: ", m->headers[x], varlen)) {
- var = val = ast_strdupa(m->headers[x] + varlen);
- if (!var)
- return head;
- strsep(&val, "=");
- if (!val || ast_strlen_zero(var))
- continue;
- cur = ast_variable_new(var, val);
- if (head) {
- cur->next = head;
- head = cur;
- } else
- head = cur;
+ if (strncasecmp("Variable: ", m->headers[x], varlen))
+ continue;
+
+ if (!(var = ast_strdupa(m->headers[x] + varlen)))
+ return head;
+
+ if ((var_count = ast_app_separate_args(var, '|', vars, sizeof(vars) / sizeof(var[0])))) {
+ for (y = 0; y < var_count; y++) {
+ var = val = vars[y];
+ strsep(&val, "=");
+ if (!val || ast_strlen_zero(var))
+ continue;
+ cur = ast_variable_new(var, val);
+ if (head) {
+ cur->next = head;
+ head = cur;
+ } else
+ head = cur;
+ }
}
}
- Previous message: [Asterisk-cvs]
asterisk/pbx pbx_ael.c, 1.16, 1.17 pbx_dundi.c, 1.47,
1.48 pbx_loopback.c, 1.10, 1.11 pbx_realtime.c, 1.13, 1.14
- Next message: [Asterisk-cvs] asterisk ChangeLog,1.58,1.59 say.c,1.73,1.74
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list