dect
/
asterisk
Archived
13
0
Fork 0

Hold private lock while handling digits

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3246 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
markster 2004-06-20 14:07:44 +00:00
parent e36b7ae312
commit f91abc6dc1
1 changed files with 2 additions and 1 deletions

View File

@ -842,6 +842,7 @@ static int zt_digit(struct ast_channel *ast, char digit)
int res = 0;
int index;
p = ast->pvt->pvt;
ast_mutex_lock(&p->lock);
index = zt_get_index(ast, p, 0);
if (index == SUB_REAL) {
#ifdef ZAPATA_PRI
@ -872,7 +873,7 @@ static int zt_digit(struct ast_channel *ast, char digit)
p->dialing = 1;
}
}
ast_mutex_unlock(&p->lock);
return res;
}