summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-06-22 22:12:06 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-06-22 22:12:06 +0000
commit62274463fa15467574c5b2735af6683cb372d7e6 (patch)
tree623513d8570e10f2a61013420bbae73ac6dc6dd0 /apps
parent30a417dc6cbbf0e58da7b6b33498c5413c6cd430 (diff)
Explicitly check caller hangup in app Queue rather than a polluted res2 value.
........ Merged revisions 369262 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369263 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 430647bba..573a90811 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -5051,7 +5051,7 @@ static int try_calling(struct queue_ent *qe, const struct ast_flags opts, char *
if (!res2) {
if (qe->parent->memberdelay) {
ast_log(LOG_NOTICE, "Delaying member connect for %d seconds\n", qe->parent->memberdelay);
- res2 |= ast_safe_sleep(peer, qe->parent->memberdelay * 1000);
+ res2 = ast_safe_sleep(peer, qe->parent->memberdelay * 1000);
}
if (!res2 && announce) {
if (play_file(peer, announce) < 0) {
@@ -5079,8 +5079,8 @@ static int try_calling(struct queue_ent *qe, const struct ast_flags opts, char *
}
}
}
+ ast_autoservice_stop(qe->chan);
}
- res2 |= ast_autoservice_stop(qe->chan);
if (ast_check_hangup(peer)) {
/* Agent must have hung up */
ast_log(LOG_WARNING, "Agent on %s hungup on the customer.\n", ast_channel_name(peer));
@@ -5098,8 +5098,8 @@ static int try_calling(struct queue_ent *qe, const struct ast_flags opts, char *
ast_hangup(peer);
ao2_ref(member, -1);
goto out;
- } else if (res2) {
- /* Caller must have hung up just before being connected*/
+ } else if (ast_check_hangup(qe->chan)) {
+ /* Caller must have hung up just before being connected */
ast_log(LOG_NOTICE, "Caller was about to talk to agent on %s but the caller hungup.\n", ast_channel_name(peer));
ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
record_abandoned(qe);