From 81bd6022a7a2148e1e15c673864076746e9155e6 Mon Sep 17 00:00:00 2001 From: markster Date: Tue, 3 Apr 2001 18:38:37 +0000 Subject: Version 0.1.8 from FTP git-svn-id: http://svn.digium.com/svn/asterisk/trunk@263 f38db490-d61c-443f-a65b-d21fe96a405b --- formats/format_wav_gsm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'formats/format_wav_gsm.c') diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c index 94e2bffd0..a7292043a 100755 --- a/formats/format_wav_gsm.c +++ b/formats/format_wav_gsm.c @@ -327,7 +327,7 @@ static struct ast_filestream *wav_open(int fd) free(tmp); return NULL; } - if (pthread_mutex_lock(&wav_lock)) { + if (ast_pthread_mutex_lock(&wav_lock)) { ast_log(LOG_WARNING, "Unable to lock wav list\n"); free(tmp); return NULL; @@ -345,7 +345,7 @@ static struct ast_filestream *wav_open(int fd) tmp->secondhalf = 0; tmp->lasttimeout = -1; glistcnt++; - pthread_mutex_unlock(&wav_lock); + ast_pthread_mutex_unlock(&wav_lock); ast_update_use_count(); } return tmp; @@ -363,7 +363,7 @@ static struct ast_filestream *wav_rewrite(int fd, char *comment) free(tmp); return NULL; } - if (pthread_mutex_lock(&wav_lock)) { + if (ast_pthread_mutex_lock(&wav_lock)) { ast_log(LOG_WARNING, "Unable to lock wav list\n"); free(tmp); return NULL; @@ -374,7 +374,7 @@ static struct ast_filestream *wav_rewrite(int fd, char *comment) tmp->owner = NULL; tmp->lasttimeout = -1; glistcnt++; - pthread_mutex_unlock(&wav_lock); + ast_pthread_mutex_unlock(&wav_lock); ast_update_use_count(); } else ast_log(LOG_WARNING, "Out of memory\n"); @@ -390,7 +390,7 @@ static void wav_close(struct ast_filestream *s) { struct ast_filestream *tmp, *tmpl = NULL; char zero = 0; - if (pthread_mutex_lock(&wav_lock)) { + if (ast_pthread_mutex_lock(&wav_lock)) { ast_log(LOG_WARNING, "Unable to lock wav list\n"); return; } @@ -413,7 +413,7 @@ static void wav_close(struct ast_filestream *s) ast_sched_del(s->owner->sched, s->owner->streamid); s->owner->streamid = -1; } - pthread_mutex_unlock(&wav_lock); + ast_pthread_mutex_unlock(&wav_lock); ast_update_use_count(); if (!tmp) ast_log(LOG_WARNING, "Freeing a filestream we don't seem to own\n"); @@ -551,7 +551,7 @@ int load_module() int unload_module() { struct ast_filestream *tmp, *tmpl; - if (pthread_mutex_lock(&wav_lock)) { + if (ast_pthread_mutex_lock(&wav_lock)) { ast_log(LOG_WARNING, "Unable to lock wav list\n"); return -1; } @@ -563,19 +563,19 @@ int unload_module() tmp = tmp->next; free(tmpl); } - pthread_mutex_unlock(&wav_lock); + ast_pthread_mutex_unlock(&wav_lock); return ast_format_unregister(name); } int usecount() { int res; - if (pthread_mutex_lock(&wav_lock)) { + if (ast_pthread_mutex_lock(&wav_lock)) { ast_log(LOG_WARNING, "Unable to lock wav list\n"); return -1; } res = glistcnt; - pthread_mutex_unlock(&wav_lock); + ast_pthread_mutex_unlock(&wav_lock); return res; } -- cgit v1.2.3