mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 18:40:46 +00:00
Change the inequalities used in app_queue with regards
to timeouts from being strict to non-strict for more accuracy. (closes issue #13239) Reported by: atis Patches: app_queue_timeouts_v2.patch uploaded by atis (license 242) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2426,7 +2426,7 @@ static int wait_our_turn(struct queue_ent *qe, int ringing, enum queue_result *r
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/* If we have timed out, break out */
|
/* If we have timed out, break out */
|
||||||
if (qe->expire && (time(NULL) > qe->expire)) {
|
if (qe->expire && (time(NULL) >= qe->expire)) {
|
||||||
*reason = QUEUE_TIMEOUT;
|
*reason = QUEUE_TIMEOUT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2455,7 +2455,7 @@ static int wait_our_turn(struct queue_ent *qe, int ringing, enum queue_result *r
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/* If we have timed out, break out */
|
/* If we have timed out, break out */
|
||||||
if (qe->expire && (time(NULL) > qe->expire)) {
|
if (qe->expire && (time(NULL) >= qe->expire)) {
|
||||||
*reason = QUEUE_TIMEOUT;
|
*reason = QUEUE_TIMEOUT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2466,7 +2466,7 @@ static int wait_our_turn(struct queue_ent *qe, int ringing, enum queue_result *r
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/* If we have timed out, break out */
|
/* If we have timed out, break out */
|
||||||
if (qe->expire && (time(NULL) > qe->expire)) {
|
if (qe->expire && (time(NULL) >= qe->expire)) {
|
||||||
*reason = QUEUE_TIMEOUT;
|
*reason = QUEUE_TIMEOUT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2480,7 +2480,7 @@ static int wait_our_turn(struct queue_ent *qe, int ringing, enum queue_result *r
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If we have timed out, break out */
|
/* If we have timed out, break out */
|
||||||
if (qe->expire && (time(NULL) > qe->expire)) {
|
if (qe->expire && (time(NULL) >= qe->expire)) {
|
||||||
*reason = QUEUE_TIMEOUT;
|
*reason = QUEUE_TIMEOUT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2725,7 +2725,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
|
|||||||
* This should be extremely rare. queue_exec will take care
|
* This should be extremely rare. queue_exec will take care
|
||||||
* of removing the caller and reporting the timeout as the reason.
|
* 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;
|
res = 0;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -3941,7 +3941,7 @@ check_turns:
|
|||||||
enum queue_member_status stat;
|
enum queue_member_status stat;
|
||||||
|
|
||||||
/* Leave if we have exceeded our queuetimeout */
|
/* Leave if we have exceeded our queuetimeout */
|
||||||
if (qe.expire && (time(NULL) > qe.expire)) {
|
if (qe.expire && (time(NULL) >= qe.expire)) {
|
||||||
record_abandoned(&qe);
|
record_abandoned(&qe);
|
||||||
reason = QUEUE_TIMEOUT;
|
reason = QUEUE_TIMEOUT;
|
||||||
res = 0;
|
res = 0;
|
||||||
@@ -3959,7 +3959,7 @@ check_turns:
|
|||||||
makeannouncement = 1;
|
makeannouncement = 1;
|
||||||
|
|
||||||
/* Leave if we have exceeded our queuetimeout */
|
/* Leave if we have exceeded our queuetimeout */
|
||||||
if (qe.expire && (time(NULL) > qe.expire)) {
|
if (qe.expire && (time(NULL) >= qe.expire)) {
|
||||||
record_abandoned(&qe);
|
record_abandoned(&qe);
|
||||||
reason = QUEUE_TIMEOUT;
|
reason = QUEUE_TIMEOUT;
|
||||||
res = 0;
|
res = 0;
|
||||||
@@ -3972,7 +3972,7 @@ check_turns:
|
|||||||
goto stop;
|
goto stop;
|
||||||
|
|
||||||
/* Leave if we have exceeded our queuetimeout */
|
/* Leave if we have exceeded our queuetimeout */
|
||||||
if (qe.expire && (time(NULL) > qe.expire)) {
|
if (qe.expire && (time(NULL) >= qe.expire)) {
|
||||||
record_abandoned(&qe);
|
record_abandoned(&qe);
|
||||||
reason = QUEUE_TIMEOUT;
|
reason = QUEUE_TIMEOUT;
|
||||||
res = 0;
|
res = 0;
|
||||||
@@ -4016,7 +4016,7 @@ check_turns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Leave if we have exceeded our queuetimeout */
|
/* Leave if we have exceeded our queuetimeout */
|
||||||
if (qe.expire && (time(NULL) > qe.expire)) {
|
if (qe.expire && (time(NULL) >= qe.expire)) {
|
||||||
record_abandoned(&qe);
|
record_abandoned(&qe);
|
||||||
reason = QUEUE_TIMEOUT;
|
reason = QUEUE_TIMEOUT;
|
||||||
res = 0;
|
res = 0;
|
||||||
|
Reference in New Issue
Block a user