diff options
Diffstat (limited to 'formats/format_vox.c')
-rwxr-xr-x | formats/format_vox.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/formats/format_vox.c b/formats/format_vox.c index 00c8e16eb..9ea35ffd5 100755 --- a/formats/format_vox.c +++ b/formats/format_vox.c @@ -48,7 +48,7 @@ struct ast_filestream { }; -static pthread_mutex_t vox_lock = AST_MUTEX_INITIALIZER; +static ast_mutex_t vox_lock = AST_MUTEX_INITIALIZER; static int glistcnt = 0; static char *name = "vox"; @@ -171,7 +171,7 @@ static struct ast_filestream *vox_open(int fd) struct ast_filestream *tmp; if ((tmp = malloc(sizeof(struct ast_filestream)))) { memset(tmp, 0, sizeof(struct ast_filestream)); - if (ast_pthread_mutex_lock(&vox_lock)) { + if (ast_mutex_lock(&vox_lock)) { ast_log(LOG_WARNING, "Unable to lock vox list\n"); free(tmp); return NULL; @@ -185,7 +185,7 @@ static struct ast_filestream *vox_open(int fd) tmp->fr.mallocd = 0; tmp->lasttimeout = -1; glistcnt++; - ast_pthread_mutex_unlock(&vox_lock); + ast_mutex_unlock(&vox_lock); ast_update_use_count(); } return tmp; @@ -199,14 +199,14 @@ static struct ast_filestream *vox_rewrite(int fd, char *comment) struct ast_filestream *tmp; if ((tmp = malloc(sizeof(struct ast_filestream)))) { memset(tmp, 0, sizeof(struct ast_filestream)); - if (ast_pthread_mutex_lock(&vox_lock)) { + if (ast_mutex_lock(&vox_lock)) { ast_log(LOG_WARNING, "Unable to lock vox list\n"); free(tmp); return NULL; } tmp->fd = fd; glistcnt++; - ast_pthread_mutex_unlock(&vox_lock); + ast_mutex_unlock(&vox_lock); ast_update_use_count(); } else ast_log(LOG_WARNING, "Out of memory\n"); @@ -215,12 +215,12 @@ static struct ast_filestream *vox_rewrite(int fd, char *comment) static void vox_close(struct ast_filestream *s) { - if (ast_pthread_mutex_lock(&vox_lock)) { + if (ast_mutex_lock(&vox_lock)) { ast_log(LOG_WARNING, "Unable to lock vox list\n"); return; } glistcnt--; - ast_pthread_mutex_unlock(&vox_lock); + ast_mutex_unlock(&vox_lock); ast_update_use_count(); close(s->fd); free(s); @@ -324,12 +324,12 @@ int unload_module() int usecount() { int res; - if (ast_pthread_mutex_lock(&vox_lock)) { + if (ast_mutex_lock(&vox_lock)) { ast_log(LOG_WARNING, "Unable to lock vox list\n"); return -1; } res = glistcnt; - ast_pthread_mutex_unlock(&vox_lock); + ast_mutex_unlock(&vox_lock); return res; } |