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
1.6.0
Mark Michelson 18 years ago
parent 5fe74de6b8
commit c540b02f6f

@ -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;
} }

Loading…
Cancel
Save