aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_followme.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-26 18:05:58 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-26 18:05:58 +0000
commitb5039b1aec531b957024a2c3c0526ebd0b3a41f9 (patch)
tree2c5f76d433cc7229f471adb7e374b8565be8f367 /apps/app_followme.c
parentf20bdf1a64f055aad50c30900be9ee87787aafc6 (diff)
Standardize the option names for consistency (but continue to work with the
existing names for backwards compatibility). (closes issue #13370) Reported by: jsturtevant git-svn-id: http://svn.digium.com/svn/asterisk/trunk@140167 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_followme.c')
-rw-r--r--apps/app_followme.c53
1 files changed, 33 insertions, 20 deletions
diff --git a/apps/app_followme.c b/apps/app_followme.c
index 84fe26c08..7e9cd5657 100644
--- a/apps/app_followme.c
+++ b/apps/app_followme.c
@@ -313,37 +313,50 @@ static int reload_followme(int reload)
featuredigittimeout = 5000;
}
- takecallstr = ast_variable_retrieve(cfg, "general", "takecall");
- if (!ast_strlen_zero(takecallstr))
+ if ((takecallstr = ast_variable_retrieve(cfg, "general", "takecall")) && !ast_strlen_zero(takecallstr)) {
ast_copy_string(takecall, takecallstr, sizeof(takecall));
+ }
- declinecallstr = ast_variable_retrieve(cfg, "general", "declinecall");
- if (!ast_strlen_zero(declinecallstr))
+ if ((declinecallstr = ast_variable_retrieve(cfg, "general", "declinecall")) && !ast_strlen_zero(declinecallstr)) {
ast_copy_string(nextindp, declinecallstr, sizeof(nextindp));
+ }
- tmpstr = ast_variable_retrieve(cfg, "general", "call-from-prompt");
- if (!ast_strlen_zero(tmpstr))
+ if ((tmpstr = ast_variable_retrieve(cfg, "general", "call-from-prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(callfromprompt, tmpstr, sizeof(callfromprompt));
+ } else if ((tmpstr = ast_variable_retrieve(cfg, "general", "call_from_prompt")) && !ast_strlen_zero(tmpstr)) {
ast_copy_string(callfromprompt, tmpstr, sizeof(callfromprompt));
+ }
- tmpstr = ast_variable_retrieve(cfg, "general", "norecording-prompt");
- if (!ast_strlen_zero(tmpstr))
+ if ((tmpstr = ast_variable_retrieve(cfg, "general", "norecording-prompt")) && !ast_strlen_zero(tmpstr)) {
ast_copy_string(norecordingprompt, tmpstr, sizeof(norecordingprompt));
+ } else if ((tmpstr = ast_variable_retrieve(cfg, "general", "norecording_prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(callfromprompt, tmpstr, sizeof(callfromprompt));
+ }
+
- tmpstr = ast_variable_retrieve(cfg, "general", "options-prompt");
- if (!ast_strlen_zero(tmpstr))
+ if ((tmpstr = ast_variable_retrieve(cfg, "general", "options-prompt")) && !ast_strlen_zero(tmpstr)) {
ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ } else if ((tmpstr = ast_variable_retrieve(cfg, "general", "options_prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ }
- tmpstr = ast_variable_retrieve(cfg, "general", "pls-hold-prompt");
- if (!ast_strlen_zero(tmpstr))
- ast_copy_string(plsholdprompt, tmpstr, sizeof(plsholdprompt));
+ if ((tmpstr = ast_variable_retrieve(cfg, "general", "pls-hold-prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ } else if ((tmpstr = ast_variable_retrieve(cfg, "general", "pls_hold_prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ }
- tmpstr = ast_variable_retrieve(cfg, "general", "status-prompt");
- if (!ast_strlen_zero(tmpstr))
- ast_copy_string(statusprompt, tmpstr, sizeof(statusprompt));
+ if ((tmpstr = ast_variable_retrieve(cfg, "general", "status-prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ } else if ((tmpstr = ast_variable_retrieve(cfg, "general", "status_prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ }
- tmpstr = ast_variable_retrieve(cfg, "general", "sorry-prompt");
- if (!ast_strlen_zero(tmpstr))
- ast_copy_string(sorryprompt, tmpstr, sizeof(sorryprompt));
+ if ((tmpstr = ast_variable_retrieve(cfg, "general", "sorry-prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ } else if ((tmpstr = ast_variable_retrieve(cfg, "general", "sorry_prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ }
/* Chug through config file */
while ((cat = ast_category_browse(cfg, cat))) {
@@ -376,7 +389,7 @@ static int reload_followme(int reload)
init_profile(f);
free_numbers(f);
var = ast_variable_browse(cfg, cat);
- while(var) {
+ while (var) {
if (!strcasecmp(var->name, "number")) {
int idx = 0;