mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
Lock agents while removing pending ones
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -348,7 +348,9 @@ static int agent_hangup(struct ast_channel *ast)
|
||||
ast_pthread_mutex_unlock(&p->app_lock);
|
||||
|
||||
if (p->pending) {
|
||||
ast_pthread_mutex_lock(&agentlock);
|
||||
agent_unlink(p);
|
||||
ast_pthread_mutex_unlock(&agentlock);
|
||||
}
|
||||
if (p->dead)
|
||||
free(p);
|
||||
|
Reference in New Issue
Block a user