[asterisk-commits] mmichelson: trunk r128640 - in /trunk: ./ channels/chan_iax2.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jul 7 12:09:12 CDT 2008
Author: mmichelson
Date: Mon Jul 7 12:09:11 2008
New Revision: 128640
URL: http://svn.digium.com/view/asterisk?view=rev&rev=128640
Log:
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)
........
Modified:
trunk/ (props changed)
trunk/channels/chan_iax2.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=128640&r1=128639&r2=128640
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Mon Jul 7 12:09:11 2008
@@ -452,6 +452,7 @@
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 @@
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 */
More information about the asterisk-commits
mailing list