mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Merged revisions 128639 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r128639 | mmichelson | 2008-07-07 12:02:28 -0500 (Mon, 07 Jul 2008) | 10 lines By using the iaxdynamicthreadcount to identify a thread, it was possible for thread identifiers to be duplicated. By using a globally-unique monotonically- increasing integer, this is now avoided. (closes issue #13009) Reported by: jpgrayson Patches: chan_iax2_dyn_threadnum.patch uploaded by jpgrayson (license 492) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -452,6 +452,7 @@ static AST_LIST_HEAD_STATIC(registrations, iax2_registry);
|
||||
static int iaxthreadcount = DEFAULT_THREAD_COUNT;
|
||||
static int iaxmaxthreadcount = DEFAULT_MAX_THREAD_COUNT;
|
||||
static int iaxdynamicthreadcount = 0;
|
||||
static int iaxdynamicthreadnum = 0;
|
||||
static int iaxactivethreadcount = 0;
|
||||
|
||||
struct iax_rr {
|
||||
@@ -1066,7 +1067,8 @@ static struct iax2_thread *find_idle_thread(void)
|
||||
return NULL;
|
||||
|
||||
/* Set default values */
|
||||
thread->threadnum = ast_atomic_fetchadd_int(&iaxdynamicthreadcount, 1);
|
||||
ast_atomic_fetchadd_int(&iaxdynamicthreadcount, 1);
|
||||
thread->threadnum = ast_atomic_fetchadd_int(&iaxdynamicthreadnum, 1);
|
||||
thread->type = IAX_THREAD_TYPE_DYNAMIC;
|
||||
|
||||
/* Initialize lock and condition */
|
||||
|
Reference in New Issue
Block a user