aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-29 20:55:40 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-29 20:55:40 +0000
commit88e10708c5ba8158ee4fdf1aa08585739125b5da (patch)
treed08154c0eafb287f12d6b28ce99eea6938c21ce8 /apps
parent2149521341f36fb9f90d61796969f2665daca309 (diff)
This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81361 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_directory.c4
-rw-r--r--apps/app_minivm.c2
-rw-r--r--apps/app_parkandannounce.c2
-rw-r--r--apps/app_voicemail.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c
index 896f9cbe1..05460c409 100644
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -386,7 +386,7 @@ static struct ast_config *realtime_directory(char *context)
/* Does the context exist within the config file? If not, make one */
cat = ast_category_get(cfg, context);
if (!cat) {
- cat = ast_category_new(context);
+ cat = ast_category_new(context, "", 99999);
if (!cat) {
ast_log(LOG_WARNING, "Out of memory\n");
ast_config_destroy(cfg);
@@ -402,7 +402,7 @@ static struct ast_config *realtime_directory(char *context)
snprintf(tmp, sizeof(tmp), "no-password,%s,hidefromdir=%s",
fullname ? fullname : "",
hidefromdir ? hidefromdir : "no");
- var = ast_variable_new(mailbox, tmp);
+ var = ast_variable_new(mailbox, tmp, "");
if (var)
ast_variable_append(cat, var);
else
diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index 30fbdc72b..5fc1d53d1 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -2141,7 +2141,7 @@ static int create_vmaccount(char *name, struct ast_variable *var, int realtime)
if (varname && (varval = strchr(varname, '='))) {
*varval = '\0';
varval++;
- if ((tmpvar = ast_variable_new(varname, varval))) {
+ if ((tmpvar = ast_variable_new(varname, varval, ""))) {
tmpvar->next = vmu->chanvars;
vmu->chanvars = tmpvar;
}
diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c
index b6ca3f53a..51841d8d3 100644
--- a/apps/app_parkandannounce.c
+++ b/apps/app_parkandannounce.c
@@ -130,7 +130,7 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
snprintf(buf, sizeof(buf), "%d", lot);
oh.parent_channel = chan;
- oh.vars = ast_variable_new("_PARKEDAT", buf);
+ oh.vars = ast_variable_new("_PARKEDAT", buf, "");
dchan = __ast_request_and_dial(dialtech, AST_FORMAT_SLINEAR, args.dial, 30000, &outstate, chan->cid.cid_num, chan->cid.cid_name, &oh);
if (dchan) {
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 6c3d1e531..2d8d9b9f1 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -960,7 +960,7 @@ static void vm_change_password(struct ast_vm_user *vmu, const char *newpassword)
if (!strcasecmp(category, vmu->mailbox)) {
if (!(tmp = ast_variable_retrieve(cfg, category, "vmsecret"))) {
ast_debug(3, "looks like we need to make vmsecret!\n");
- var = ast_variable_new("vmsecret", newpassword);
+ var = ast_variable_new("vmsecret", newpassword, "");
}
new = alloca(strlen(newpassword)+1);
sprintf(new, "%s", newpassword);