summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/app_dial.c14
-rw-r--r--apps/app_directory.c6
-rw-r--r--apps/app_queue.c21
3 files changed, 20 insertions, 21 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index d2e9e6f3d..46330fc65 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -2697,11 +2697,11 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
if (gosub_args) {
res9 = pbx_exec(peer, theapp, gosub_args);
if (!res9) {
- struct ast_pbx_args args;
+ struct ast_pbx_args pbx_args;
/* A struct initializer fails to compile for this case ... */
- memset(&args, 0, sizeof(args));
- args.no_hangup_chan = 1;
- ast_pbx_run_args(peer, &args);
+ memset(&pbx_args, 0, sizeof(pbx_args));
+ pbx_args.no_hangup_chan = 1;
+ ast_pbx_run_args(peer, &pbx_args);
}
ast_free(gosub_args);
ast_debug(1, "Gosub exited with status %d\n", res9);
@@ -2869,9 +2869,9 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
} else { /* F() */
- int res;
- res = ast_goto_if_exists(peer, ast_channel_context(chan), ast_channel_exten(chan), (ast_channel_priority(chan)) + 1);
- if (res == AST_PBX_GOTO_FAILED) {
+ int goto_res;
+ goto_res = ast_goto_if_exists(peer, ast_channel_context(chan), ast_channel_exten(chan), (ast_channel_priority(chan)) + 1);
+ if (goto_res == AST_PBX_GOTO_FAILED) {
ast_hangup(peer);
goto out;
}
diff --git a/apps/app_directory.c b/apps/app_directory.c
index 52e8722c2..bbca1bf62 100644
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -472,7 +472,7 @@ static struct ast_config *realtime_directory(char *context)
mailbox = NULL;
while ( (mailbox = ast_category_browse(rtdata, mailbox)) ) {
- const char *context = ast_variable_retrieve(rtdata, mailbox, "context");
+ const char *ctx = ast_variable_retrieve(rtdata, mailbox, "context");
fullname = ast_variable_retrieve(rtdata, mailbox, "fullname");
if (ast_true((hidefromdir = ast_variable_retrieve(rtdata, mailbox, "hidefromdir")))) {
@@ -482,8 +482,8 @@ static struct ast_config *realtime_directory(char *context)
snprintf(tmp, sizeof(tmp), "no-password,%s", S_OR(fullname, ""));
/* Does the context exist within the config file? If not, make one */
- if (!(cat = ast_category_get(cfg, context))) {
- if (!(cat = ast_category_new(context, "", 99999))) {
+ if (!(cat = ast_category_get(cfg, ctx))) {
+ if (!(cat = ast_category_new(ctx, "", 99999))) {
ast_log(LOG_WARNING, "Out of memory\n");
ast_config_destroy(cfg);
if (rtdata) {
diff --git a/apps/app_queue.c b/apps/app_queue.c
index ec04a2d52..7871a3d12 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3567,7 +3567,7 @@ static void record_abandoned(struct queue_ent *qe)
}
/*! \brief RNA == Ring No Answer. Common code that is executed when we try a queue member and they don't answer. */
-static void rna(int rnatime, struct queue_ent *qe, char *interface, char *membername, int pause)
+static void rna(int rnatime, struct queue_ent *qe, char *interface, char *membername, int autopause)
{
ast_verb(3, "Nobody picked up in %d ms\n", rnatime);
@@ -3597,7 +3597,7 @@ static void rna(int rnatime, struct queue_ent *qe, char *interface, char *member
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
}
ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), membername, "RINGNOANSWER", "%d", rnatime);
- if (qe->parent->autopause != QUEUE_AUTOPAUSE_OFF && pause) {
+ if (qe->parent->autopause != QUEUE_AUTOPAUSE_OFF && autopause) {
if (qe->parent->autopausedelay > 0) {
struct member *mem;
ao2_lock(qe->parent);
@@ -5320,18 +5320,15 @@ static int try_calling(struct queue_ent *qe, const struct ast_flags opts, char *
if (!ast_check_hangup(peer) && ast_test_flag(&opts, OPT_CALLEE_GO_ON)) {
if (!ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {
- int res;
replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
- res = ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
- if (res == AST_PBX_SUCCESS) {
+
+ if (ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]) == AST_PBX_SUCCESS) {
ast_pbx_start(peer);
} else {
ast_hangup(peer);
}
} else { /* F() */
- int res;
- res = ast_goto_if_exists(peer, caller_context, caller_extension, caller_priority + 1);
- if (res == AST_PBX_GOTO_FAILED) {
+ if (ast_goto_if_exists(peer, caller_context, caller_extension, caller_priority + 1) == AST_PBX_GOTO_FAILED) {
ast_hangup(peer);
} else {
ast_pbx_start(peer);
@@ -5674,11 +5671,13 @@ static int set_member_penalty(const char *queuename, const char *interface, int
if (ast_strlen_zero(queuename)) { /* This means we need to iterate through all the queues. */
if (ast_check_realtime("queues")) {
- char *queuename;
+ char *name;
queue_config = ast_load_realtime_multientry("queues", "name LIKE", "%", SENTINEL);
if (queue_config) {
- for (queuename = ast_category_browse(queue_config, NULL); !ast_strlen_zero(queuename); queuename = ast_category_browse(queue_config, queuename)) {
- if ((q = find_load_queue_rt_friendly(queuename))) {
+ for (name = ast_category_browse(queue_config, NULL);
+ !ast_strlen_zero(name);
+ name = ast_category_browse(queue_config, name)) {
+ if ((q = find_load_queue_rt_friendly(name))) {
foundqueue++;
foundinterface += set_member_penalty_help_members(q, interface, penalty);
}