Index: apps/app_queue.c =================================================================== --- apps/app_queue.c (revision 135618) +++ apps/app_queue.c (working copy) @@ -1967,6 +1967,14 @@ ast_log(LOG_DEBUG, "Trying '%s' with metric %d\n", best->interface, best->metric); ret = ring_entry(qe, best, busies); } + + /* If we have timed out, break out */ + if (qe->expire && (time(NULL) >= qe->expire)) { + if (option_debug) + ast_log(LOG_DEBUG, "Queue timed out while ringing members.\n"); + ret = 0; + break; + } } return ret; @@ -2424,7 +2432,7 @@ break; /* If we have timed out, break out */ - if (qe->expire && (time(NULL) > qe->expire)) { + if (qe->expire && (time(NULL) >= qe->expire)) { *reason = QUEUE_TIMEOUT; break; } @@ -2453,7 +2461,7 @@ break; /* If we have timed out, break out */ - if (qe->expire && (time(NULL) > qe->expire)) { + if (qe->expire && (time(NULL) >= qe->expire)) { *reason = QUEUE_TIMEOUT; break; } @@ -2464,7 +2472,7 @@ break; /* If we have timed out, break out */ - if (qe->expire && (time(NULL) > qe->expire)) { + if (qe->expire && (time(NULL) >= qe->expire)) { *reason = QUEUE_TIMEOUT; break; } @@ -2478,7 +2486,7 @@ } /* If we have timed out, break out */ - if (qe->expire && (time(NULL) > qe->expire)) { + if (qe->expire && (time(NULL) >= qe->expire)) { *reason = QUEUE_TIMEOUT; break; } @@ -2723,7 +2731,7 @@ * This should be extremely rare. queue_exec will take care * of removing the caller and reporting the timeout as the reason. */ - if (qe->expire && now > qe->expire) { + if (qe->expire && now >= qe->expire) { res = 0; goto out; } @@ -3939,7 +3947,7 @@ enum queue_member_status stat; /* Leave if we have exceeded our queuetimeout */ - if (qe.expire && (time(NULL) > qe.expire)) { + if (qe.expire && (time(NULL) >= qe.expire)) { record_abandoned(&qe); reason = QUEUE_TIMEOUT; res = 0; @@ -3957,7 +3965,7 @@ makeannouncement = 1; /* Leave if we have exceeded our queuetimeout */ - if (qe.expire && (time(NULL) > qe.expire)) { + if (qe.expire && (time(NULL) >= qe.expire)) { record_abandoned(&qe); reason = QUEUE_TIMEOUT; res = 0; @@ -3970,7 +3978,7 @@ goto stop; /* Leave if we have exceeded our queuetimeout */ - if (qe.expire && (time(NULL) > qe.expire)) { + if (qe.expire && (time(NULL) >= qe.expire)) { record_abandoned(&qe); reason = QUEUE_TIMEOUT; res = 0; @@ -4014,7 +4022,7 @@ } /* Leave if we have exceeded our queuetimeout */ - if (qe.expire && (time(NULL) > qe.expire)) { + if (qe.expire && (time(NULL) >= qe.expire)) { record_abandoned(&qe); reason = QUEUE_TIMEOUT; res = 0;