diff options
author | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-03-12 06:00:18 +0000 |
---|---|---|
committer | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-03-12 06:00:18 +0000 |
commit | f61680257a63d31f0abcf41b5c29f4670552af2f (patch) | |
tree | 37350d3bd0d6df02129f16dc35b893e9a674e627 /channel.c | |
parent | 9cfcee51633cfff22801dd82843f5b7c7f4fdd82 (diff) |
Wed Mar 12 07:00:01 CET 2003
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@641 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rwxr-xr-x | channel.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -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; } |