[svn-commits] mmichelson: branch 1.6.0 r128641 - in /branches/1.6.0: ./ channels/chan_iax2.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 7 12:10:15 CDT 2008


Author: mmichelson
Date: Mon Jul  7 12:10:14 2008
New Revision: 128641

URL: http://svn.digium.com/view/asterisk?view=rev&rev=128641
Log:
Merged revisions 128640 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r128640 | mmichelson | 2008-07-07 12:09:11 -0500 (Mon, 07 Jul 2008) | 18 lines

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:
    branches/1.6.0/   (props changed)
    branches/1.6.0/channels/chan_iax2.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/chan_iax2.c?view=diff&rev=128641&r1=128640&r2=128641
==============================================================================
--- branches/1.6.0/channels/chan_iax2.c (original)
+++ branches/1.6.0/channels/chan_iax2.c Mon Jul  7 12:10:14 2008
@@ -455,6 +455,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 {
@@ -1059,7 +1060,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 svn-commits mailing list