git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Josh Roberson
2005-11-20 06:59:42 +00:00
parent 5d71dfeaea
commit 39407c4366
2 changed files with 11 additions and 4 deletions

View File

@@ -202,11 +202,16 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f)
} else if (!strcasecmp(buf, "setvar") || !strcasecmp(buf, "set")) {
c2 = c;
strsep(&c2, "=");
var = ast_variable_new(c, c2);
if (var) {
var->next = o->vars;
o->vars = var;
if (c2)
{
var = ast_variable_new(c, c2);
if (var) {
var->next = o->vars;
o->vars = var;
}
}
else
ast_log(LOG_WARNING, "Malformed \"%s\" argument. Should be \"%s: variable=value\"\n", buf, buf);
} else if (!strcasecmp(buf, "account")) {
var = ast_variable_new("CDR(accountcode|r)", c);
if (var) {