(res = say_position(qe,ringing)))
break;
+ /* If we have timed out, break out */
+ if (qe->expire && (time(NULL) > qe->expire)) {
+ *reason = QUEUE_TIMEOUT;
+ break;
+ }
+
/* Make a periodic announcement, if enabled */
if (qe->parent->periodicannouncefrequency &&
(res = say_periodic_announcement(qe,ringing)))
update_qe_rule(qe);
}
+ /* If we have timed out, break out */
+ if (qe->expire && (time(NULL) > qe->expire)) {
+ *reason = QUEUE_TIMEOUT;
+ break;
+ }
+
/* Wait a second before checking again */
if ((res = ast_waitfordigit(qe->chan, RECHECK * 1000))) {
if (res > 0 && !valid_exit(qe, res))
else
break;
}
+
+ /* If we have timed out, break out */
+ if (qe->expire && (time(NULL) > qe->expire)) {
+ *reason = QUEUE_TIMEOUT;
+ break;
+ }
}
return res;
tmpid[0] = 0;
meid[0] = 0;
time(&now);
+
+ /* If we've already exceeded our timeout, then just stop
+ * 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) {
+ res = 0;
+ goto out;
+ }
for (; options && *options; options++)
switch (*options) {
if (qe.parent->periodicannouncefrequency)
if ((res = say_periodic_announcement(&qe,ringing)))
goto stop;
+
+ /* Leave if we have exceeded our queuetimeout */
+ if (qe.expire && (time(NULL) > qe.expire)) {
+ record_abandoned(&qe);
+ reason = QUEUE_TIMEOUT;
+ res = 0;
+ ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
+ break;
+ }
/* see if we need to move to the next penalty level for this queue */
while (qe.pr && ((time(NULL) - qe.start) > qe.pr->time)) {
/* If using dynamic realtime members, we should regenerate the member list for this queue */
update_realtime_members(qe.parent);
-
/* OK, we didn't get anybody; wait for 'retry' seconds; may get a digit to exit with */
res = wait_a_bit(&qe);
if (res)