[asterisk-commits] russell: branch 1.4 r75067 - in /branches/1.4: ./ res/res_musiconhold.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 13 15:10:40 CDT 2007


Author: russell
Date: Fri Jul 13 15:10:40 2007
New Revision: 75067

URL: http://svn.digium.com/view/asterisk?view=rev&rev=75067
Log:
Merged revisions 75059 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75059 | russell | 2007-07-13 15:07:21 -0500 (Fri, 13 Jul 2007) | 6 lines

Ensure that adding a user to the list of users of a specific music on hold
class is not done at the same time as any of the other operations on this list
to prevent list corruption.  Using the global moh_data lock for this is not
ideal, but it is what is used to protect these lists everywhere else in the
module, and I am only changing what is necessary to fix the bug.

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/res/res_musiconhold.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/res/res_musiconhold.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_musiconhold.c?view=diff&rev=75067&r1=75066&r2=75067
==============================================================================
--- branches/1.4/res/res_musiconhold.c (original)
+++ branches/1.4/res/res_musiconhold.c Fri Jul 13 15:10:40 2007
@@ -665,7 +665,10 @@
 	moh->f.offset = AST_FRIENDLY_OFFSET;
 
 	moh->parent = cl;
+
+	AST_LIST_LOCK(&mohclasses);
 	AST_LIST_INSERT_HEAD(&cl->members, moh, list);
+	AST_LIST_UNLOCK(&mohclasses);
 	
 	return moh;
 }




More information about the asterisk-commits mailing list