mirror of
https://github.com/asterisk/asterisk.git
synced 2026-01-06 01:51:14 +00:00
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:
16
channel.c
16
channel.c
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user