mer feb 12 14:56:57 CET 2003

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matteo Brancaleoni
2003-02-12 13:59:15 +00:00
parent d2f186de49
commit 2bd936105e
62 changed files with 1371 additions and 597 deletions

View File

@@ -376,6 +376,7 @@ int ast_queue_frame(struct ast_channel *chan, struct ast_frame *fin, int lock)
int ast_queue_hangup(struct ast_channel *chan, int lock)
{
struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_HANGUP };
chan->_softhangup |= AST_SOFTHANGUP_DEV;
return ast_queue_frame(chan, &f, lock);
}
@@ -1145,7 +1146,7 @@ static int do_senddigit(struct ast_channel *chan, char digit)
int ast_write(struct ast_channel *chan, struct ast_frame *fr)
{
int res = -1;
struct ast_frame *f;
struct ast_frame *f = NULL;
/* Stop if we're a zombie or need a soft hangup */
if (chan->zombie || ast_check_hangup(chan))
return -1;
@@ -1180,7 +1181,7 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
default:
if (chan->pvt->write) {
if (chan->pvt->writetrans) {
f = ast_translate(chan->pvt->writetrans, fr, 1);
f = ast_translate(chan->pvt->writetrans, fr, 0);
} else
f = fr;
if (f)
@@ -1189,6 +1190,8 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
res = 0;
}
}
if (f && (f != fr))
ast_frfree(f);
chan->blocking = 0;
/* Consider a write failure to force a soft hangup */
if (res < 0)