Don't check availability on a hungup channel
authorMark Spencer <markster@digium.com>
Mon, 14 Jul 2003 02:57:45 +0000 (02:57 +0000)
committerMark Spencer <markster@digium.com>
Mon, 14 Jul 2003 02:57:45 +0000 (02:57 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1179 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index cfd779d..4d9b2d5 100755 (executable)
@@ -415,7 +415,7 @@ static int agent_hangup(struct ast_channel *ast)
                p->abouttograb = 0;
        } else if (p->dead) {
                free(p);
-       } else {
+       } else if (p->chan) {
                /* Not dead -- check availability now */
                ast_pthread_mutex_lock(&p->lock);
                check_availability(p, 1);