diff options
Diffstat (limited to 'translate.c')
-rwxr-xr-x | translate.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/translate.c b/translate.c index 64165fd88..f6b0f2cda 100755 --- a/translate.c +++ b/translate.c @@ -253,7 +253,7 @@ static int show_translation(int fd, int argc, char *argv[]) return RESULT_SHOWUSAGE; ast_cli(fd, " Translation times between formats (in milliseconds)\n"); ast_cli(fd, " Destination Format\n"); - pthread_mutex_lock(&list_lock); + ast_pthread_mutex_lock(&list_lock); for (x=0;x<SHOW_TRANS; x++) { if (x == 1) strcpy(line, " Src "); @@ -270,7 +270,7 @@ static int show_translation(int fd, int argc, char *argv[]) snprintf(line + strlen(line), sizeof(line) - strlen(line), "\n"); ast_cli(fd, line); } - pthread_mutex_unlock(&list_lock); + ast_pthread_mutex_unlock(&list_lock); return RESULT_SUCCESS; } @@ -295,7 +295,7 @@ int ast_register_translator(struct ast_translator *t) calc_cost(t); if (option_verbose > 1) ast_verbose(VERBOSE_PREFIX_2 "Registered translator '%s' from format %d to %d, cost %d\n", t->name, t->srcfmt, t->dstfmt, t->cost); - pthread_mutex_lock(&list_lock); + ast_pthread_mutex_lock(&list_lock); if (!added_cli) { ast_cli_register(&show_trans); added_cli++; @@ -303,14 +303,14 @@ int ast_register_translator(struct ast_translator *t) t->next = list; list = t; rebuild_matrix(); - pthread_mutex_unlock(&list_lock); + ast_pthread_mutex_unlock(&list_lock); return 0; } int ast_unregister_translator(struct ast_translator *t) { struct ast_translator *u, *ul = NULL; - pthread_mutex_lock(&list_lock); + ast_pthread_mutex_lock(&list_lock); u = list; while(u) { if (u == t) { @@ -324,7 +324,7 @@ int ast_unregister_translator(struct ast_translator *t) u = u->next; } rebuild_matrix(); - pthread_mutex_unlock(&list_lock); + ast_pthread_mutex_unlock(&list_lock); return (u ? 0 : -1); } @@ -336,7 +336,7 @@ int ast_translator_best_choice(int *dst, int *srcs) int bestdst=0; int cur = 1; int besttime=999999999; - pthread_mutex_lock(&list_lock); + ast_pthread_mutex_lock(&list_lock); for (y=0;y<MAX_FORMAT;y++) { if ((cur & *dst) && (cur & *srcs)) { /* This is a common format to both. Pick it if we don't have one already */ @@ -363,6 +363,6 @@ int ast_translator_best_choice(int *dst, int *srcs) *dst = bestdst; best = 0; } - pthread_mutex_unlock(&list_lock); + ast_pthread_mutex_unlock(&list_lock); return best; } |