diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-07 20:38:43 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-07 20:38:43 +0000 |
commit | 4d714a548871e5858faa4d7b9bdb0ffebccde161 (patch) | |
tree | b4a1d4ac13b7ad2896d52e705bc10dc76563c489 /channels | |
parent | b64c7117dddd2cd4dba0a24a3ba60166ee0167c4 (diff) |
Big diet for struct ast_channel
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4399 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/chan_agent.c | 6 | ||||
-rwxr-xr-x | channels/chan_phone.c | 2 | ||||
-rwxr-xr-x | channels/chan_zap.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c index 256d625af..526f24e12 100755 --- a/channels/chan_agent.c +++ b/channels/chan_agent.c @@ -323,7 +323,7 @@ static struct ast_frame *agent_read(struct ast_channel *ast) ast_mutex_lock(&p->lock); CHECK_FORMATS(ast, p); if (p->chan) { - p->chan->exception = ast->exception; + ast_copy_flags(p->chan, ast, AST_FLAG_EXCEPTION); if (ast->fdno == AST_MAX_FDS - 3) p->chan->fdno = AST_MAX_FDS - 2; else @@ -819,7 +819,7 @@ static struct ast_channel *agent_new(struct agent_pvt *p, int state) p->owning_app = pthread_self(); /* After the above step, there should not be any blockers. */ if (p->chan) { - if (p->chan->blocking) { + if (ast_test_flag(p->chan, AST_FLAG_BLOCKING)) { ast_log( LOG_ERROR, "A blocker exists after agent channel ownership acquired\n" ); CRASH; } @@ -1003,7 +1003,7 @@ static int check_availability(struct agent_pvt *newlyavailable, int needlock) /* Go ahead and mark the channel as a zombie so that masquerade will destroy it for us, and we need not call ast_hangup */ ast_mutex_lock(&parent->lock); - chan->zombie = 1; + ast_set_flag(chan, AST_FLAG_ZOMBIE); ast_channel_masquerade(parent, chan); ast_mutex_unlock(&parent->lock); p->abouttograb = 0; diff --git a/channels/chan_phone.c b/channels/chan_phone.c index 12c009776..a155b8331 100755 --- a/channels/chan_phone.c +++ b/channels/chan_phone.c @@ -434,7 +434,7 @@ static struct ast_frame *phone_read(struct ast_channel *ast) /* Try to read some data... */ CHECK_BLOCKING(ast); res = read(p->fd, p->buf, PHONE_MAX_BUF); - ast->blocking = 0; + ast_clear_flag(ast, AST_FLAG_BLOCKING); if (res < 0) { #if 0 if (errno == EAGAIN) { diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 0ed2862f4..9f6475e8a 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -3995,7 +3995,7 @@ struct ast_frame *zt_read(struct ast_channel *ast) readbuf = ((unsigned char *)p->subs[index].buffer) + AST_FRIENDLY_OFFSET; CHECK_BLOCKING(ast); res = read(p->subs[index].zfd, readbuf, p->subs[index].linear ? READ_SIZE * 2 : READ_SIZE); - ast->blocking = 0; + ast_clear_flag(ast, AST_FLAG_BLOCKING); /* Check for hangup */ if (res < 0) { f = NULL; @@ -4172,7 +4172,7 @@ struct ast_frame *zt_read(struct ast_channel *ast) /* If we have a fake_event, trigger exception to handle it */ if (p->fake_event) - ast->exception = 1; + ast_set_flag(ast, AST_FLAG_EXCEPTION); ast_mutex_unlock(&p->lock); return f; |