mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +00:00
Hold private lock while handling digits
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -842,6 +842,7 @@ static int zt_digit(struct ast_channel *ast, char digit)
|
|||||||
int res = 0;
|
int res = 0;
|
||||||
int index;
|
int index;
|
||||||
p = ast->pvt->pvt;
|
p = ast->pvt->pvt;
|
||||||
|
ast_mutex_lock(&p->lock);
|
||||||
index = zt_get_index(ast, p, 0);
|
index = zt_get_index(ast, p, 0);
|
||||||
if (index == SUB_REAL) {
|
if (index == SUB_REAL) {
|
||||||
#ifdef ZAPATA_PRI
|
#ifdef ZAPATA_PRI
|
||||||
@@ -872,7 +873,7 @@ static int zt_digit(struct ast_channel *ast, char digit)
|
|||||||
p->dialing = 1;
|
p->dialing = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ast_mutex_unlock(&p->lock);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user