[asterisk-commits] trunk - r7678 in /trunk: ./ channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Dec 30 08:57:01 CST 2005


Author: tilghman
Date: Fri Dec 30 08:57:00 2005
New Revision: 7678

URL: http://svn.digium.com/view/asterisk?rev=7678&view=rev
Log:
Merged revisions 7677 via svnmerge from
/branches/1.2

Modified:
    trunk/   (props changed)
    trunk/channel.c

Propchange: trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Dec 30 08:57:00 2005
@@ -1,1 +1,1 @@
-/branches/1.2:1-7489,7491-7496,7498-7516,7518-7528,7530-7545,7547-7549,7551,7553-7556,7558-7579,7581-7585,7587-7594,7596-7604,7606-7640,7642-7662,7664-7665
+/branches/1.2:1-7489,7491-7496,7498-7516,7518-7528,7530-7545,7547-7549,7551,7553-7556,7558-7579,7581-7585,7587-7594,7596-7604,7606-7640,7642-7662,7664-7665,7677

Modified: trunk/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/channel.c?rev=7678&r1=7677&r2=7678&view=diff
==============================================================================
--- trunk/channel.c (original)
+++ trunk/channel.c Fri Dec 30 08:57:00 2005
@@ -94,6 +94,7 @@
  */
 static int shutting_down = 0;
 
+AST_MUTEX_DEFINE_STATIC(uniquelock);
 static int uniqueint = 0;
 
 unsigned long global_fin = 0, global_fout = 0;
@@ -572,7 +573,9 @@
 	tmp->data = NULL;
 	tmp->fin = global_fin;
 	tmp->fout = global_fout;
+	ast_mutex_lock(&uniquelock);
 	snprintf(tmp->uniqueid, sizeof(tmp->uniqueid), "%li.%d", (long) time(NULL), uniqueint++);
+	ast_mutex_unlock(&uniquelock);
 	headp = &tmp->varshead;
 	ast_mutex_init(&tmp->lock);
 	AST_LIST_HEAD_INIT_NOLOCK(headp);



More information about the asterisk-commits mailing list