Wed Mar 12 07:00:01 CET 2003

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matteo Brancaleoni
2003-03-12 06:00:18 +00:00
parent 67fad0eab1
commit 66a57e51e3
18 changed files with 820 additions and 310 deletions

View File

@@ -1043,7 +1043,12 @@ struct ast_frame *ast_read(struct ast_channel *chan)
ast_deactivate_generator(chan);
}
}
chan->fin++;
if (chan->fin & 0x80000000)
ast_frame_dump(chan->name, f, "<<");
if ((chan->fin & 0x7fffffff) == 0x7fffffff)
chan->fin &= 0x80000000;
else
chan->fin++;
return f;
}
@@ -1197,6 +1202,8 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
else
return 0;
}
if (chan->fout & 0x80000000)
ast_frame_dump(chan->name, fr, ">>");
CHECK_BLOCKING(chan);
switch(fr->frametype) {
case AST_FRAME_CONTROL:
@@ -1228,8 +1235,13 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
/* Consider a write failure to force a soft hangup */
if (res < 0)
chan->_softhangup |= AST_SOFTHANGUP_DEV;
else
else {
if ((chan->fout & 0x7fffffff) == 0x7fffffff)
chan->fout &= 0x80000000;
else
chan->fout++;
chan->fout++;
}
return res;
}