Lock agents while removing pending ones
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1168 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
67746a9e91
commit
8d2efd9288
|
@ -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