]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Hold private lock while handling digits
authorMark Spencer <markster@digium.com>
Sun, 20 Jun 2004 14:07:44 +0000 (14:07 +0000)
committerMark Spencer <markster@digium.com>
Sun, 20 Jun 2004 14:07:44 +0000 (14:07 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3246 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index e8976066160ebb3a2f29df2e934d86d780fba373..38759c0664c641c3e6f0e5d088c4802ff54a430a 100755 (executable)
@@ -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;
 }