]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't show agents as available when they are in wrap-up time. #6726 (ZX81)
authorBJ Weschke <bweschke@btwtech.com>
Mon, 8 May 2006 14:12:20 +0000 (14:12 +0000)
committerBJ Weschke <bweschke@btwtech.com>
Mon, 8 May 2006 14:12:20 +0000 (14:12 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25563 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index 0193d8cddbf03af5c5e8658047cbdeeae27264cc..0d0c9eba1dc0c58bde6ea5c466b6761bea9de841 100644 (file)
@@ -1613,7 +1613,10 @@ static int agents_show(int fd, int argc, char **argv)
                                }
                                online_agents++;
                        } else if (!ast_strlen_zero(p->loginchan)) {
-                               snprintf(location, sizeof(location) - 20, "available at '%s'", p->loginchan);
+                               if (ast_tvdiff_ms(ast_tvnow(), p->lastdisc) > 0 || !(p->lastdisc.tv_sec)) 
+                                       snprintf(location, sizeof(location) - 20, "available at '%s'", p->loginchan);
+                               else 
+                                       snprintf(location, sizeof(location) - 20, "wrapping up at '%s'", p->loginchan);
                                talkingto[0] = '\0';
                                online_agents++;
                                if (p->acknowledged)