summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-12-07 20:38:43 +0000
committerMark Spencer <markster@digium.com>2004-12-07 20:38:43 +0000
commitc46e21252ca5fa71068105403403d057ccdf4851 (patch)
treeb4a1d4ac13b7ad2896d52e705bc10dc76563c489 /channels
parent53f5a568fb9889ddbe544557a03f0e69bfeb14a4 (diff)
Big diet for struct ast_channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_agent.c6
-rwxr-xr-xchannels/chan_phone.c2
-rwxr-xr-xchannels/chan_zap.c4
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;