diff options
author | martinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-12-11 18:01:03 +0000 |
---|---|---|
committer | martinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-12-11 18:01:03 +0000 |
commit | d10fd7b4040992ed397afc1961fe3536a76d4cd6 (patch) | |
tree | 6bfede8d3d5220f23951ec8948b6b2a86a908093 | |
parent | aca5bbaa5ce83b23d99c24075b9346175aa5bd95 (diff) |
We really don't want to lock ourselves in zt_exception
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1854 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | channels/chan_zap.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index eb8e9cb3f..5f7025097 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -3182,7 +3182,7 @@ static struct ast_frame *zt_handle_event(struct ast_channel *ast) -static struct ast_frame *__zt_exception(struct ast_channel *ast) +static struct ast_frame *zt_exception(struct ast_channel *ast) { struct zt_pvt *p = ast->pvt->pvt; int res; @@ -3288,16 +3288,6 @@ static struct ast_frame *__zt_exception(struct ast_channel *ast) return f; } -struct ast_frame *zt_exception(struct ast_channel *ast) -{ - struct zt_pvt *p = ast->pvt->pvt; - struct ast_frame *f; - ast_mutex_lock(&p->lock); - f = __zt_exception(ast); - ast_mutex_unlock(&p->lock); - return f; -} - struct ast_frame *zt_read(struct ast_channel *ast) { struct zt_pvt *p = ast->pvt->pvt; @@ -3413,7 +3403,7 @@ struct ast_frame *zt_read(struct ast_channel *ast) ast_mutex_unlock(&p->lock); return &p->subs[index].f; } else if (errno == ELAST) { - f = __zt_exception(ast); + f = zt_exception(ast); } else ast_log(LOG_WARNING, "zt_rec: %s\n", strerror(errno)); } @@ -3422,7 +3412,7 @@ struct ast_frame *zt_read(struct ast_channel *ast) } if (res != (p->subs[index].linear ? READ_SIZE * 2 : READ_SIZE)) { ast_log(LOG_DEBUG, "Short read (%d/%d), must be an event...\n", res, p->subs[index].linear ? READ_SIZE * 2 : READ_SIZE); - f = __zt_exception(ast); + f = zt_exception(ast); ast_mutex_unlock(&p->lock); return f; } |