mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
lock list of translators *before* recalculating the translation matrix
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -331,6 +331,7 @@ static int show_translation(int fd, int argc, char *argv[])
|
||||
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 @@ static int show_translation(int fd, int argc, char *argv[])
|
||||
|
||||
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] = ' ';
|
||||
|
Reference in New Issue
Block a user