Fix race in agent login
authorMark Spencer <markster@digium.com>
Wed, 6 Aug 2003 01:39:42 +0000 (01:39 +0000)
committerMark Spencer <markster@digium.com>
Wed, 6 Aug 2003 01:39:42 +0000 (01:39 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1265 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index 22b7f97..e2832d3 100755 (executable)
@@ -237,6 +237,7 @@ static struct ast_frame  *agent_read(struct ast_channel *ast)
                        if (strlen(p->loginchan))
                                ast_hangup(p->chan);
                        p->chan = NULL;
+                       p->acknowledged = 0;
                }
        }
        if (f && (f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_ANSWER)) {