[svn-commits] branch 1.2 - r7965 /branches/1.2/translate.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Jan 10 22:53:26 CST 2006


Author: russell
Date: Tue Jan 10 22:53:24 2006
New Revision: 7965

URL: http://svn.digium.com/view/asterisk?rev=7965&view=rev
Log:
lock list of translators *before* recalculating the translation matrix

Modified:
    branches/1.2/translate.c

Modified: branches/1.2/translate.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/translate.c?rev=7965&r1=7964&r2=7965&view=diff
==============================================================================
--- branches/1.2/translate.c (original)
+++ branches/1.2/translate.c Tue Jan 10 22:53:24 2006
@@ -331,6 +331,7 @@
 	if (argc > 4) 
 		return RESULT_SHOWUSAGE;
 
+	ast_mutex_lock(&list_lock);
 	if (argv[2] && !strcasecmp(argv[2],"recalc")) {
 		z = argv[3] ? atoi(argv[3]) : 1;
 
@@ -349,7 +350,6 @@
 
 	ast_cli(fd, "         Translation times between formats (in milliseconds)\n");
 	ast_cli(fd, "          Source Format (Rows) Destination Format(Columns)\n\n");
-	ast_mutex_lock(&list_lock);
 	for (x = -1; x < SHOW_TRANS; x++) {
 		/* next 2 lines run faster than using strcpy() */
 		line[0] = ' ';



More information about the svn-commits mailing list