aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-25 06:10:20 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-25 06:10:20 +0000
commit2207b9a515214bf72785eabf75bd587bd7df23e8 (patch)
tree5e740f79246c281ef1bc43bcffc87fd21f676005 /apps
parentc7f2030d7977ded782c6430a33e57bbbb69cd6df (diff)
Merge config updates (bug #3406)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4889 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_alarmreceiver.c4
-rwxr-xr-xapps/app_directory.c4
-rwxr-xr-xapps/app_enumlookup.c4
-rwxr-xr-xapps/app_festival.c12
-rwxr-xr-xapps/app_meetme.c8
-rwxr-xr-xapps/app_privacy.c4
-rwxr-xr-xapps/app_queue.c4
-rwxr-xr-xapps/app_realtime.c2
-rwxr-xr-xapps/app_rpt.c2
-rwxr-xr-xapps/app_txtcidname.c4
-rwxr-xr-xapps/app_voicemail.c20
11 files changed, 34 insertions, 34 deletions
diff --git a/apps/app_alarmreceiver.c b/apps/app_alarmreceiver.c
index ed10e55cb..bb4ca3e48 100755
--- a/apps/app_alarmreceiver.c
+++ b/apps/app_alarmreceiver.c
@@ -747,7 +747,7 @@ static int load_config(void)
/* Read in the config file */
- cfg = ast_load(ALMRCV_CONFIG);
+ cfg = ast_config_load(ALMRCV_CONFIG);
if(!cfg){
@@ -817,7 +817,7 @@ static int load_config(void)
strncpy(db_family, p, sizeof(db_family) - 1);
db_family[sizeof(db_family) - 1] = '\0';
}
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
}
return 0;
diff --git a/apps/app_directory.c b/apps/app_directory.c
index eab10a3fc..8404d5269 100755
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -351,7 +351,7 @@ static int directory_exec(struct ast_channel *chan, void *data)
ast_log(LOG_WARNING, "directory requires an argument (context[,dialcontext])\n");
return -1;
}
- cfg = ast_load(DIRECTORY_CONFIG);
+ cfg = ast_config_load(DIRECTORY_CONFIG);
if (!cfg) {
ast_log(LOG_WARNING, "Unable to open directory configuration %s\n", DIRECTORY_CONFIG);
return -1;
@@ -400,7 +400,7 @@ top:
}
}
}
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
LOCAL_USER_REMOVE(u);
return res;
}
diff --git a/apps/app_enumlookup.c b/apps/app_enumlookup.c
index 16c9cf059..4664cd68a 100755
--- a/apps/app_enumlookup.c
+++ b/apps/app_enumlookup.c
@@ -145,14 +145,14 @@ static int load_config(void)
struct ast_config *cfg;
char *s;
- cfg = ast_load(ENUM_CONFIG);
+ cfg = ast_config_load(ENUM_CONFIG);
if (cfg) {
if (!(s=ast_variable_retrieve(cfg, "general", "h323driver"))) {
strncpy(h323driver, H323DRIVERDEFAULT, sizeof(h323driver) - 1);
} else {
strncpy(h323driver, s, sizeof(h323driver) - 1);
}
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
return 0;
}
ast_log(LOG_NOTICE, "No ENUM Config file, using defaults\n");
diff --git a/apps/app_festival.c b/apps/app_festival.c
index 13eaa26b2..91a23c1fa 100755
--- a/apps/app_festival.c
+++ b/apps/app_festival.c
@@ -282,7 +282,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
char *intstr;
struct ast_config *cfg;
- cfg = ast_load(FESTIVAL_CONFIG);
+ cfg = ast_config_load(FESTIVAL_CONFIG);
if (!cfg) {
ast_log(LOG_WARNING, "No such configuration file %s\n", FESTIVAL_CONFIG);
return -1;
@@ -308,7 +308,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
}
if (!vdata || ast_strlen_zero(vdata)) {
ast_log(LOG_WARNING, "festival requires an argument (text)\n");
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
return -1;
}
strncpy(data, vdata, sizeof(data) - 1);
@@ -326,7 +326,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
if (fd < 0) {
ast_log(LOG_WARNING,"festival_client: can't get socket\n");
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
return -1;
}
memset(&serv_addr, 0, sizeof(serv_addr));
@@ -335,7 +335,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
serverhost = ast_gethostbyname(host, &ahp);
if (serverhost == (struct hostent *)0) {
ast_log(LOG_WARNING,"festival_client: gethostbyname failed\n");
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
return -1;
}
memmove(&serv_addr.sin_addr,serverhost->h_addr, serverhost->h_length);
@@ -345,7 +345,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
if (connect(fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) != 0) {
ast_log(LOG_WARNING,"festival_client: connect to server failed\n");
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
return -1;
}
@@ -448,7 +448,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
}
} while (strcmp(ack,"OK\n") != 0);
close(fd);
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
LOCAL_USER_REMOVE(u);
return res;
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 9385269f6..150b36576 100755
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -1187,7 +1187,7 @@ static struct ast_conference *find_conf(struct ast_channel *chan, char *confno,
}
} else {
/* Check the config */
- cfg = ast_load("meetme.conf");
+ cfg = ast_config_load("meetme.conf");
if (!cfg) {
ast_log(LOG_WARNING, "No meetme.conf file :(\n");
return NULL;
@@ -1215,7 +1215,7 @@ static struct ast_conference *find_conf(struct ast_channel *chan, char *confno,
if (!var) {
ast_log(LOG_DEBUG, "%s isn't a valid conference\n", confno);
}
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
}
} else if (dynamic_pin) {
/* Correct for the user selecting 'D' instead of 'd' to have
@@ -1373,7 +1373,7 @@ static int conf_exec(struct ast_channel *chan, void *data)
/* We only need to load the config file for static and empty_no_pin (otherwise we don't care) */
if ((empty_no_pin) || (!dynamic)) {
- cfg = ast_load("meetme.conf");
+ cfg = ast_config_load("meetme.conf");
if (cfg) {
var = ast_variable_browse(cfg, "rooms");
while(var) {
@@ -1421,7 +1421,7 @@ static int conf_exec(struct ast_channel *chan, void *data)
}
var = var->next;
}
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
}
}
/* Select first conference number not in use */
diff --git a/apps/app_privacy.c b/apps/app_privacy.c
index 39a1c1843..13bc38c30 100755
--- a/apps/app_privacy.c
+++ b/apps/app_privacy.c
@@ -82,7 +82,7 @@ privacy_exec (struct ast_channel *chan, void *data)
}
}
/*Read in the config file*/
- cfg = ast_load(PRIV_CONFIG);
+ cfg = ast_config_load(PRIV_CONFIG);
/*Play unidentified call*/
@@ -144,7 +144,7 @@ privacy_exec (struct ast_channel *chan, void *data)
chan->priority+=100;
}
if (cfg)
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
}
LOCAL_USER_REMOVE (u);
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 8ab4351ad..b8a0baa62 100755
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2388,7 +2388,7 @@ static void reload_queues(void)
int new;
char *general_val = NULL;
- cfg = ast_load("queues.conf");
+ cfg = ast_config_load("queues.conf");
if (!cfg) {
ast_log(LOG_NOTICE, "No call queueing config file (queues.conf), so no call queues\n");
return;
@@ -2578,7 +2578,7 @@ static void reload_queues(void)
}
cat = ast_category_browse(cfg, cat);
}
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
q = queues;
ql = NULL;
while(q) {
diff --git a/apps/app_realtime.c b/apps/app_realtime.c
index 03236e8cb..d0895f411 100755
--- a/apps/app_realtime.c
+++ b/apps/app_realtime.c
@@ -185,7 +185,7 @@ static int realtime_exec(struct ast_channel *chan, void *data)
pbx_builtin_setvar_helper(chan, vname, itt->value);
}
- ast_destroy_realtime(var);
+ ast_variables_destroy(var);
} else if (option_verbose > 3)
ast_verbose(VERBOSE_PREFIX_4"No Realtime Matches Found.\n");
}
diff --git a/apps/app_rpt.c b/apps/app_rpt.c
index 5ad267780..fee56bbe9 100755
--- a/apps/app_rpt.c
+++ b/apps/app_rpt.c
@@ -3856,7 +3856,7 @@ pthread_attr_t attr;
/* start with blank config */
memset(&rpt_vars,0,sizeof(rpt_vars));
- cfg = ast_load("rpt.conf");
+ cfg = ast_config_load("rpt.conf");
if (!cfg) {
ast_log(LOG_NOTICE, "Unable to open radio repeater configuration rpt.conf. Radio Repeater disabled.\n");
pthread_exit(NULL);
diff --git a/apps/app_txtcidname.c b/apps/app_txtcidname.c
index 43684c401..5cffb271a 100755
--- a/apps/app_txtcidname.c
+++ b/apps/app_txtcidname.c
@@ -87,14 +87,14 @@ static int load_config(void)
struct ast_config *cfg;
char *s;
- cfg = ast_load(ENUM_CONFIG);
+ cfg = ast_config_load(ENUM_CONFIG);
if (cfg) {
if (!(s=ast_variable_retrieve(cfg, "general", "h323driver"))) {
strncpy(h323driver, H323DRIVERDEFAULT, sizeof(h323driver) - 1);
} else {
strncpy(h323driver, s, sizeof(h323driver) - 1);
}
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
return 0;
}
ast_log(LOG_NOTICE, "No ENUM Config file, using defaults\n");
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 70d0e2b00..d39fbbd66 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1072,7 +1072,7 @@ static int store_file(char *dir, int msgnum)
else
strncpy(fn, dir, sizeof(fn) - 1);
snprintf(full_fn, sizeof(full_fn), "%s.txt", fn);
- cfg = ast_load(full_fn);
+ cfg = ast_config_load(full_fn);
snprintf(full_fn, sizeof(full_fn), "%s.%s", fn, fmt);
fd = open(full_fn, O_RDWR);
if (fd < 0) {
@@ -1144,7 +1144,7 @@ static int store_file(char *dir, int msgnum)
ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
yuck:
if (cfg)
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
if (fdm)
munmap(fdm, fdlen);
if (fd > -1)
@@ -3091,7 +3091,7 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
/* load the information on the source message so we can send an e-mail like a new message */
snprintf(miffile, sizeof(miffile), "%s/msg%04d.txt", dir, curmsg);
- if ((mif=ast_load(miffile))) {
+ if ((mif=ast_config_load(miffile))) {
/* set callerid and duration variables */
snprintf(callerid, sizeof(callerid), "FWD from: %s from %s", sender->fullname, ast_variable_retrieve(mif, NULL, "callerid"));
@@ -3116,7 +3116,7 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
sendpage(myserveremail, vmtmp->pager, todircount, vmtmp->mailbox, chan->cid.cid_num, chan->cid.cid_name, duration, vmtmp);
}
- ast_destroy(mif); /* or here */
+ ast_config_destroy(mif); /* or here */
}
/* Leave voicemail for someone */
manager_event(EVENT_FLAG_CALL, "MessageWaiting", "Mailbox: %s\r\nWaiting: %d\r\n", ext_context, has_voicemail(ext_context, NULL));
@@ -3344,7 +3344,7 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
make_file(vms->fn2, sizeof(vms->fn2), vms->curdir, vms->curmsg);
snprintf(filename,sizeof(filename), "%s.txt", vms->fn2);
RETRIEVE(vms->curdir, vms->curmsg);
- msg_cfg = ast_load(filename);
+ msg_cfg = ast_config_load(filename);
if (!msg_cfg) {
ast_log(LOG_WARNING, "No message attribute file?!! (%s)\n", filename);
return 0;
@@ -3375,7 +3375,7 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
/* Allow pressing '1' to skip envelope / callerid */
if (res == '1')
res = 0;
- ast_destroy(msg_cfg);
+ ast_config_destroy(msg_cfg);
if (!res) {
make_file(vms->fn, sizeof(vms->fn), vms->curdir, vms->curmsg);
@@ -5139,7 +5139,7 @@ static int load_config(void)
int x;
int tmpadsi[4];
- cfg = ast_load(VOICEMAIL_CONFIG);
+ cfg = ast_config_load(VOICEMAIL_CONFIG);
ast_mutex_lock(&vmlock);
cur = users;
while (cur) {
@@ -5475,7 +5475,7 @@ static int load_config(void)
tmpread = tmpwrite+len;
}
}
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
ast_mutex_unlock(&vmlock);
return 0;
} else {
@@ -5605,7 +5605,7 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
make_file(vms->fn2, sizeof(vms->fn2), vms->curdir, vms->curmsg);
snprintf(filename,sizeof(filename), "%s.txt", vms->fn2);
- msg_cfg = ast_load(filename);
+ msg_cfg = ast_config_load(filename);
if (!msg_cfg) {
ast_log(LOG_WARNING, "No message attribute file?!! (%s)\n", filename);
return 0;
@@ -5735,7 +5735,7 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
}
}
- ast_destroy(msg_cfg);
+ ast_config_destroy(msg_cfg);
if (!res) {
make_file(vms->fn, sizeof(vms->fn), vms->curdir, msg);