]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fixed a bug wherein agents get stuck busy. (issue 9618, reported by jiddings, patched...
authorMark Michelson <mmichelson@digium.com>
Fri, 6 Jul 2007 15:26:40 +0000 (15:26 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 6 Jul 2007 15:26:40 +0000 (15:26 +0000)
closes issue #9618

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73674 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index 9084cb09a3c16f05bf7c7af8b3cb7838006ba57e..8f35081e20526f5d91655e579e2aa3e9d022f79a 100644 (file)
@@ -1340,7 +1340,7 @@ static struct ast_channel *agent_request(const char *type, int format, void *dat
 #if 0
                                ast_log(LOG_NOTICE, "Time now: %ld, Time of lastdisc: %ld\n", tv.tv_sec, p->lastdisc.tv_sec);
 #endif
-                               if (!p->lastdisc.tv_sec || (tv.tv_sec > p->lastdisc.tv_sec)) {
+                               if (!p->lastdisc.tv_sec || (tv.tv_sec >= p->lastdisc.tv_sec)) {
                                        p->lastdisc = ast_tv(0, 0);
                                        /* Agent must be registered, but not have any active call, and not be in a waiting state */
                                        if (!p->owner && p->chan) {