mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-23 14:44:28 +00:00
The diff for this change looks really bad, but all I did here was decrease the indentation of most
of the queue_exec function by reversing the logic of an if statement. This change makes the function comply better with the coding guidelines. Since this change is purely a cosmetic change to the code, I am only committing the change to trunk. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4213,7 +4213,11 @@ static int queue_exec(struct ast_channel *chan, void *data)
|
|||||||
qe.last_periodic_announce_time = time(NULL);
|
qe.last_periodic_announce_time = time(NULL);
|
||||||
qe.last_periodic_announce_sound = 0;
|
qe.last_periodic_announce_sound = 0;
|
||||||
qe.valid_digits = 0;
|
qe.valid_digits = 0;
|
||||||
if (!join_queue(args.queuename, &qe, &reason)) {
|
if (join_queue(args.queuename, &qe, &reason)) {
|
||||||
|
ast_log(LOG_WARNING, "Unable to join queue '%s'\n", args.queuename);
|
||||||
|
set_queue_result(chan, reason);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
ast_queue_log(args.queuename, chan->uniqueid, "NONE", "ENTERQUEUE", "%s|%s", S_OR(args.url, ""),
|
ast_queue_log(args.queuename, chan->uniqueid, "NONE", "ENTERQUEUE", "%s|%s", S_OR(args.url, ""),
|
||||||
S_OR(chan->cid.cid_num, ""));
|
S_OR(chan->cid.cid_num, ""));
|
||||||
copy_rules(&qe, args.rule);
|
copy_rules(&qe, args.rule);
|
||||||
@@ -4370,11 +4374,6 @@ stop:
|
|||||||
leave_queue(&qe);
|
leave_queue(&qe);
|
||||||
if (reason != QUEUE_UNKNOWN)
|
if (reason != QUEUE_UNKNOWN)
|
||||||
set_queue_result(chan, reason);
|
set_queue_result(chan, reason);
|
||||||
} else {
|
|
||||||
ast_log(LOG_WARNING, "Unable to join queue '%s'\n", args.queuename);
|
|
||||||
set_queue_result(chan, reason);
|
|
||||||
res = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user