aboutsummaryrefslogtreecommitdiffstats
path: root/translate.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2001-04-03 18:38:37 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2001-04-03 18:38:37 +0000
commit81bd6022a7a2148e1e15c673864076746e9155e6 (patch)
treeef59618ca69feea7194e46c7392abcc10884484d /translate.c
parent43262aded51ebe1b604c70b5aa39d48ea59a50cf (diff)
Version 0.1.8 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@263 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'translate.c')
-rwxr-xr-xtranslate.c16
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;
}