]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix issue on channel numbering (calls could have same channel number
authorAlexandr Anikin <may@telecom-service.ru>
Tue, 18 Oct 2011 23:20:53 +0000 (23:20 +0000)
committerAlexandr Anikin <may@telecom-service.ru>
Tue, 18 Oct 2011 23:20:53 +0000 (23:20 +0000)
on heavy loaded system)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@341312 65c4cc65-6c06-0410-ace0-fbb531ad65f3

addons/chan_ooh323.c

index 830a6232020523694b7f1eec20f06ac5b3c6ed73..06b7a672e6c2ce96af4d25c20ab45113ab690a80 100644 (file)
@@ -353,10 +353,10 @@ static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
 
        /* Don't hold a h323 pvt lock while we allocate a channel */
        ast_mutex_unlock(&i->lock);
+       ast_mutex_lock(&ooh323c_cn_lock);
        ch = ast_channel_alloc(1, state, i->callerid_num, i->callerid_name, 
                                i->accountcode, i->exten, i->context, linkedid, i->amaflags,
                                "OOH323/%s-%ld", host, callnumber);
-       ast_mutex_lock(&ooh323c_cn_lock);
        callnumber++;
        ast_mutex_unlock(&ooh323c_cn_lock);