Merge "app_queue: Add QUEUE_RAISE_PENALTY feature"
authorJoshua Colp <jcolp@digium.com>
Wed, 24 May 2017 18:04:16 +0000 (13:04 -0500)
committerGerrit Code Review <gerrit2@gerrit.digium.api>
Wed, 24 May 2017 18:04:16 +0000 (13:04 -0500)
1  2 
apps/app_queue.c

@@@ -5460,11 -5521,10 +5519,11 @@@ static int wait_our_turn(struct queue_e
                if (qe->parent->leavewhenempty) {
                        int status = 0;
  
-                       if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->parent->leavewhenempty, 0))) {
+                       if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->raise_penalty, qe->parent->leavewhenempty, 0))) {
                                *reason = QUEUE_LEAVEEMPTY;
                                ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) (time(NULL) - qe->start));
 -                              leave_queue(qe);
 +                              res = -1;
 +                              qe->handled = -1;
                                break;
                        }
                }