Don't consider wrapuptime when call was not answered

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer 2005-03-05 04:17:13 +00:00
parent c6cb8f9239
commit 6f2ed85340
1 changed files with 2 additions and 2 deletions

View File

@ -388,7 +388,7 @@ static struct ast_frame *agent_read(struct ast_channel *ast)
if (p->chan)
ast_log(LOG_DEBUG, "Bridge on '%s' being cleared (2)\n", p->chan->name);
ast_hangup(p->chan);
if (p->wrapuptime) {
if (p->wrapuptime && p->acknowledged) {
gettimeofday(&p->lastdisc, NULL);
p->lastdisc.tv_usec += (p->wrapuptime % 1000) * 1000;
if (p->lastdisc.tv_usec > 1000000) {
@ -642,7 +642,7 @@ static int agent_hangup(struct ast_channel *ast)
/* If they're dead, go ahead and hang up on the agent now */
if (!ast_strlen_zero(p->loginchan)) {
/* Store last disconnect time */
if (p->wrapuptime) {
if (p->wrapuptime && p->acknowledged) {
gettimeofday(&p->lastdisc, NULL);
p->lastdisc.tv_usec += (p->wrapuptime % 1000) * 1000;
if (p->lastdisc.tv_usec >= 1000000) {