]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Put agent login board in the right place
authorMark Spencer <markster@digium.com>
Tue, 19 Aug 2003 19:49:45 +0000 (19:49 +0000)
committerMark Spencer <markster@digium.com>
Tue, 19 Aug 2003 19:49:45 +0000 (19:49 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1378 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index babb5c8172cf5c397cc020488d492ead003f3560..0ebfdb337f4cc92746b96ce360e3f02eb349b7f6 100755 (executable)
@@ -488,17 +488,15 @@ static int agent_hangup(struct ast_channel *ast)
        } else if (p->chan) {
                /* Not dead -- check availability now */
                ast_mutex_lock(&p->lock);
-               if (strlen(p->loginchan)) {
-                       if (!p->wrapuptime)
-                               check_availability(p, 1);
-                       else {
-                               /* XXX Need to add support for wrapuptime on callback agents */
-                       }
-               } else {
-                       /* Store last disconnect time */
-                       gettimeofday(&p->lastdisc, NULL);
-               }
+               /* Store last disconnect time */
+               gettimeofday(&p->lastdisc, NULL);
                ast_mutex_unlock(&p->lock);
+       } else if (strlen(p->loginchan)) {
+               if (!p->wrapuptime)
+                       check_availability(p, 1);
+               else {
+                       /* XXX Need to add support for wrapuptime on callback agents */
+               }
        }
        return 0;
 }