summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2005-12-04 20:40:46 +0000
committerRussell Bryant <russell@russellbryant.com>2005-12-04 20:40:46 +0000
commitec05153ac4e80313e89a0326bfefe17a4ae21f9c (patch)
tree6f52bce69ee88362d0b801e94372ecc39c5091d2 /apps
parentb6b32ebd9148b30dd2c3899237a6bb3ca3bd7c1a (diff)
convert most of the option_*'s to a single ast_flags structure. Also, fix some
formatting, remove some unnecessary casts, and other little code cleanups. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_chanisavail.c2
-rw-r--r--apps/app_controlplayback.c2
-rw-r--r--apps/app_db.c2
-rw-r--r--apps/app_dial.c4
-rw-r--r--apps/app_enumlookup.c4
-rw-r--r--apps/app_groupcount.c2
-rw-r--r--apps/app_hasnewvoicemail.c2
-rw-r--r--apps/app_image.c2
-rw-r--r--apps/app_lookupblacklist.c2
-rw-r--r--apps/app_md5.c2
-rw-r--r--apps/app_osplookup.c6
-rw-r--r--apps/app_playback.c2
-rw-r--r--apps/app_privacy.c2
-rw-r--r--apps/app_queue.c8
-rw-r--r--apps/app_record.c2
-rw-r--r--apps/app_sendtext.c2
-rw-r--r--apps/app_system.c2
-rw-r--r--apps/app_transfer.c2
-rw-r--r--apps/app_txtcidname.c2
-rw-r--r--apps/app_url.c4
-rw-r--r--apps/app_voicemail.c6
21 files changed, 31 insertions, 31 deletions
diff --git a/apps/app_chanisavail.c b/apps/app_chanisavail.c
index 3ac603f71..7f8633a65 100644
--- a/apps/app_chanisavail.c
+++ b/apps/app_chanisavail.c
@@ -143,7 +143,7 @@ static int chanavail_exec(struct ast_channel *chan, void *data)
if (res < 1) {
pbx_builtin_setvar_helper(chan, "AVAILCHAN", "");
pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", "");
- if (priority_jump || option_priority_jumping) {
+ if (priority_jump || ast_opt_priority_jumping) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
LOCAL_USER_REMOVE(u);
return -1;
diff --git a/apps/app_controlplayback.c b/apps/app_controlplayback.c
index 55a46ceb5..262ba7a94 100644
--- a/apps/app_controlplayback.c
+++ b/apps/app_controlplayback.c
@@ -139,7 +139,7 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "USERSTOPPED");
} else {
if (res < 0) {
- if (priority_jump || option_priority_jumping) {
+ if (priority_jump || ast_opt_priority_jumping) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
ast_log(LOG_WARNING, "ControlPlayback tried to jump to priority n+101 as requested, but priority didn't exist\n");
}
diff --git a/apps/app_db.c b/apps/app_db.c
index 245c8d3ca..e633cbfce 100644
--- a/apps/app_db.c
+++ b/apps/app_db.c
@@ -264,7 +264,7 @@ static int get_exec(struct ast_channel *chan, void *data)
} else {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "DBget: Value not found in database.\n");
- if (priority_jump || option_priority_jumping) {
+ if (priority_jump || ast_opt_priority_jumping) {
/* Send the call to n+101 priority, where n is the current priority */
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
}
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 641e07e25..c224a9a95 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -418,7 +418,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
strcpy(status, "CONGESTION");
else if (numnochan)
strcpy(status, "CHANUNAVAIL");
- if (option_priority_jumping || priority_jump)
+ if (ast_opt_priority_jumping || priority_jump)
ast_goto_if_exists(in, in->context, in->exten, in->priority + 101);
} else {
if (option_verbose > 2)
@@ -1453,7 +1453,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
if ((macro_result = pbx_builtin_getvar_helper(peer, "MACRO_RESULT"))) {
if (!strcasecmp(macro_result, "BUSY")) {
ast_copy_string(status, macro_result, sizeof(status));
- if (option_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
+ if (ast_opt_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
if (!ast_goto_if_exists(chan, NULL, NULL, chan->priority + 101)) {
ast_set_flag(peerflags, OPT_GO_ON);
}
diff --git a/apps/app_enumlookup.c b/apps/app_enumlookup.c
index bd209c47b..98e66e1a8 100644
--- a/apps/app_enumlookup.c
+++ b/apps/app_enumlookup.c
@@ -122,7 +122,7 @@ static int enumlookup_exec(struct ast_channel *chan, void *data)
res = ast_get_enum(chan, args.d, dest, sizeof(dest), tech, sizeof(tech), NULL, NULL);
if (!res) { /* Failed to do a lookup */
- if (priority_jump || option_priority_jumping) {
+ if (priority_jump || ast_opt_priority_jumping) {
/* Look for a "busy" place */
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
}
@@ -180,7 +180,7 @@ static int enumlookup_exec(struct ast_channel *chan, void *data)
*t = 0;
pbx_builtin_setvar_helper(chan, "ENUM", tmp);
ast_log(LOG_NOTICE, "tel: ENUM set to \"%s\"\n", tmp);
- if (priority_jump || option_priority_jumping) {
+ if (priority_jump || ast_opt_priority_jumping) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 51))
res = 0;
}
diff --git a/apps/app_groupcount.c b/apps/app_groupcount.c
index 0d35ca394..a85286023 100644
--- a/apps/app_groupcount.c
+++ b/apps/app_groupcount.c
@@ -177,7 +177,7 @@ static int group_check_exec(struct ast_channel *chan, void *data)
count = ast_app_group_get_count(pbx_builtin_getvar_helper(chan, category), category);
if (count > max) {
pbx_builtin_setvar_helper(chan, "CHECKGROUPSTATUS", "OVERMAX");
- if (priority_jump || option_priority_jumping) {
+ if (priority_jump || ast_opt_priority_jumping) {
if (!ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
res = -1;
}
diff --git a/apps/app_hasnewvoicemail.c b/apps/app_hasnewvoicemail.c
index 7ce8a9132..60a461151 100644
--- a/apps/app_hasnewvoicemail.c
+++ b/apps/app_hasnewvoicemail.c
@@ -162,7 +162,7 @@ static int hasvoicemail_exec(struct ast_channel *chan, void *data)
if (vmcount > 0) {
/* Branch to the next extension */
- if (priority_jump || option_priority_jumping) {
+ if (priority_jump || ast_opt_priority_jumping) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
ast_log(LOG_WARNING, "VM box %s@%s has new voicemail, but extension %s, priority %d doesn't exist\n", vmbox, context, chan->exten, chan->priority + 101);
}
diff --git a/apps/app_image.c b/apps/app_image.c
index e23b274a9..3ae981017 100644
--- a/apps/app_image.c
+++ b/apps/app_image.c
@@ -96,7 +96,7 @@ static int sendimage_exec(struct ast_channel *chan, void *data)
if (!ast_supports_images(chan)) {
/* Does not support transport */
- if (priority_jump || option_priority_jumping)
+ if (priority_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
pbx_builtin_setvar_helper(chan, "SENDIMAGESTATUS", "NOSUPPORT");
LOCAL_USER_REMOVE(u);
diff --git a/apps/app_lookupblacklist.c b/apps/app_lookupblacklist.c
index 1f7e30fd8..d7890be96 100644
--- a/apps/app_lookupblacklist.c
+++ b/apps/app_lookupblacklist.c
@@ -96,7 +96,7 @@ lookupblacklist_exec (struct ast_channel *chan, void *data)
}
if (bl) {
- if (priority_jump || option_priority_jumping)
+ if (priority_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
pbx_builtin_setvar_helper(chan, "LOOKUPBLSTATUS", "FOUND");
} else
diff --git a/apps/app_md5.c b/apps/app_md5.c
index 24f3b74e4..127b3d7e8 100644
--- a/apps/app_md5.c
+++ b/apps/app_md5.c
@@ -156,7 +156,7 @@ static int md5check_exec(struct ast_channel *chan, void *data)
if (option_debug > 2)
ast_log(LOG_DEBUG, "ERROR: MD5 not verified: %s -- %s\n", args.md5hash, args.string);
pbx_builtin_setvar_helper(chan, "CHECKMD5STATUS", "NOMATCH");
- if (priority_jump || option_priority_jumping) {
+ if (priority_jump || ast_opt_priority_jumping) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
if (option_debug > 2)
ast_log(LOG_DEBUG, "ERROR: Can't jump to exten+101 (e%s,p%d), sorry\n", chan->exten,chan->priority+101);
diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c
index 2fe2d016a..e56038fdd 100644
--- a/apps/app_osplookup.c
+++ b/apps/app_osplookup.c
@@ -171,7 +171,7 @@ static int osplookup_exec(struct ast_channel *chan, void *data)
}
if (!res) {
/* Look for a "busy" place */
- if (priority_jump || option_priority_jumping)
+ if (priority_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
} else if (res > 0)
res = 0;
@@ -244,7 +244,7 @@ static int ospnext_exec(struct ast_channel *chan, void *data)
}
if (!res) {
/* Look for a "busy" place */
- if (priority_jump || option_priority_jumping)
+ if (priority_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
} else if (res > 0)
res = 0;
@@ -317,7 +317,7 @@ static int ospfinished_exec(struct ast_channel *chan, void *data)
}
if (!res) {
/* Look for a "busy" place */
- if (priority_jump || option_priority_jumping)
+ if (priority_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
} else if (res > 0)
res = 0;
diff --git a/apps/app_playback.c b/apps/app_playback.c
index ed33097ab..6271fba77 100644
--- a/apps/app_playback.c
+++ b/apps/app_playback.c
@@ -130,7 +130,7 @@ static int playback_exec(struct ast_channel *chan, void *data)
ast_stopstream(chan);
} else {
ast_log(LOG_WARNING, "ast_streamfile failed on %s for %s\n", chan->name, (char *)data);
- if (priority_jump || option_priority_jumping)
+ if (priority_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
res = 0;
mres = 1;
diff --git a/apps/app_privacy.c b/apps/app_privacy.c
index 799f31bd2..b94fd69d8 100644
--- a/apps/app_privacy.c
+++ b/apps/app_privacy.c
@@ -202,7 +202,7 @@ static int privacy_exec (struct ast_channel *chan, void *data)
ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID to %s\n",phone);
pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "SUCCESS");
} else {
- if (priority_jump || option_priority_jumping)
+ if (priority_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "FAILED");
}
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 5564d0fcd..d997d25a1 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2617,7 +2617,7 @@ static int pqm_exec(struct ast_channel *chan, void *data)
if (set_member_paused(args.queuename, args.interface, 1)) {
ast_log(LOG_WARNING, "Attempt to pause interface %s, not found\n", args.interface);
- if (priority_jump || option_priority_jumping) {
+ if (priority_jump || ast_opt_priority_jumping) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
pbx_builtin_setvar_helper(chan, "PQMSTATUS", "NOTFOUND");
LOCAL_USER_REMOVE(u);
@@ -2673,7 +2673,7 @@ static int upqm_exec(struct ast_channel *chan, void *data)
if (set_member_paused(args.queuename, args.interface, 0)) {
ast_log(LOG_WARNING, "Attempt to unpause interface %s, not found\n", args.interface);
- if (priority_jump || option_priority_jumping) {
+ if (priority_jump || ast_opt_priority_jumping) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
pbx_builtin_setvar_helper(chan, "UPQMSTATUS", "NOTFOUND");
LOCAL_USER_REMOVE(u);
@@ -2738,7 +2738,7 @@ static int rqm_exec(struct ast_channel *chan, void *data)
break;
case RES_EXISTS:
ast_log(LOG_WARNING, "Unable to remove interface '%s' from queue '%s': Not there\n", args.interface, args.queuename);
- if (priority_jump || option_priority_jumping)
+ if (priority_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
pbx_builtin_setvar_helper(chan, "RQMSTATUS", "NOTINQUEUE");
res = 0;
@@ -2814,7 +2814,7 @@ static int aqm_exec(struct ast_channel *chan, void *data)
break;
case RES_EXISTS:
ast_log(LOG_WARNING, "Unable to add interface '%s' to queue '%s': Already there\n", args.interface, args.queuename);
- if (priority_jump || option_priority_jumping)
+ if (priority_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
pbx_builtin_setvar_helper(chan, "AQMSTATUS", "MEMBERALREADY");
res = 0;
diff --git a/apps/app_record.c b/apps/app_record.c
index 85310ea70..669afc7a0 100644
--- a/apps/app_record.c
+++ b/apps/app_record.c
@@ -249,7 +249,7 @@ static int record_exec(struct ast_channel *chan, void *data)
goto out;
}
- if (option_transmit_silence_during_record)
+ if (ast_opt_transmit_silence)
silgen = ast_channel_start_silence_generator(chan);
/* Request a video update */
diff --git a/apps/app_sendtext.c b/apps/app_sendtext.c
index 7830ee860..c08a793f3 100644
--- a/apps/app_sendtext.c
+++ b/apps/app_sendtext.c
@@ -105,7 +105,7 @@ static int sendtext_exec(struct ast_channel *chan, void *data)
if (!chan->tech->send_text) {
ast_mutex_unlock(&chan->lock);
/* Does not support transport */
- if (priority_jump || option_priority_jumping)
+ if (priority_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
LOCAL_USER_REMOVE(u);
return 0;
diff --git a/apps/app_system.c b/apps/app_system.c
index 63e9baacb..f3e09ebba 100644
--- a/apps/app_system.c
+++ b/apps/app_system.c
@@ -111,7 +111,7 @@ static int system_exec_helper(struct ast_channel *chan, void *data, int failmode
} else {
if (res < 0)
res = 0;
- if (option_priority_jumping && res)
+ if (ast_opt_priority_jumping && res)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
if (res != 0)
diff --git a/apps/app_transfer.c b/apps/app_transfer.c
index aaff52be0..78d5697c0 100644
--- a/apps/app_transfer.c
+++ b/apps/app_transfer.c
@@ -131,7 +131,7 @@ static int transfer_exec(struct ast_channel *chan, void *data)
if (res < 0) {
status = "FAILURE";
- if (priority_jump || option_priority_jumping)
+ if (priority_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
res = 0;
} else {
diff --git a/apps/app_txtcidname.c b/apps/app_txtcidname.c
index b6e365b54..f2a65dcb6 100644
--- a/apps/app_txtcidname.c
+++ b/apps/app_txtcidname.c
@@ -119,7 +119,7 @@ static int txtcidname_exec(struct ast_channel *chan, void *data)
}
if (!res) {
/* Look for a "busy" place */
- if (priority_jump || option_priority_jumping)
+ if (priority_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
pbx_builtin_setvar_helper(chan, "TXTCIDNAMESTATUS", "FAILED");
} else if (res > 0)
diff --git a/apps/app_url.c b/apps/app_url.c
index 7f274b46a..a856fb1a4 100644
--- a/apps/app_url.c
+++ b/apps/app_url.c
@@ -108,7 +108,7 @@ static int sendurl_exec(struct ast_channel *chan, void *data)
if (!ast_channel_supports_html(chan)) {
/* Does not support transport */
- if (local_option_jump || option_priority_jumping)
+ if (local_option_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
pbx_builtin_setvar_helper(chan, "SENDURLSTATUS", "UNSUPPORTED");
LOCAL_USER_REMOVE(u);
@@ -144,7 +144,7 @@ static int sendurl_exec(struct ast_channel *chan, void *data)
case AST_HTML_NOSUPPORT:
/* Does not support transport */
status ="UNSUPPORTED";
- if (local_option_jump || option_priority_jumping)
+ if (local_option_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
res = 0;
goto out;
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 85ea1c8ff..03ddc7bb2 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -2382,7 +2382,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
if (!(vmu = find_user(&svm, context, ext))) {
ast_log(LOG_WARNING, "No entry in voicemail config file for '%s'\n", ext);
- if (ast_test_flag(options, OPT_PRIORITY_JUMP) || option_priority_jumping)
+ if (ast_test_flag(options, OPT_PRIORITY_JUMP) || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED");
return res;
@@ -5543,7 +5543,7 @@ static int vm_exec(struct ast_channel *chan, void *data)
if (res == ERROR_LOCK_PATH) {
ast_log(LOG_ERROR, "Could not leave voicemail. The path is already locked.\n");
/*Send the call to n+101 priority, where n is the current priority*/
- if (ast_test_flag(&leave_options, OPT_PRIORITY_JUMP) || option_priority_jumping)
+ if (ast_test_flag(&leave_options, OPT_PRIORITY_JUMP) || ast_opt_priority_jumping)
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
ast_log(LOG_WARNING, "Extension %s, priority %d doesn't exist.\n", chan->exten, chan->priority + 101);
pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED");
@@ -5633,7 +5633,7 @@ static int vm_box_exists(struct ast_channel *chan, void *data)
if (find_user(&svm, context, args.mbox)) {
pbx_builtin_setvar_helper(chan, "VMBOXEXISTSSTATUS", "SUCCESS");
- if (priority_jump || option_priority_jumping)
+ if (priority_jump || ast_opt_priority_jumping)
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
ast_log(LOG_WARNING, "VM box %s@%s exists, but extension %s, priority %d doesn't exist\n", box, context, chan->exten, chan->priority + 101);
} else