dect
/
asterisk
Archived
13
0
Fork 0

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:
markster 2003-07-08 19:02:36 +00:00
parent 67746a9e91
commit 8d2efd9288
1 changed files with 2 additions and 0 deletions

View File

@ -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);