1) When we get a translated frame out, clone it, because if the

translator pvt is freed before we use the frame, bad things happen.
2) Getting a failure from ast_sched_delete means that the schedule
ID is currently running.  Don't just ignore it.
(Closes issue #11698)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-01-10 23:08:36 +00:00
parent 87a55d5882
commit 7f61492a42
2 changed files with 15 additions and 5 deletions

View File

@@ -232,7 +232,10 @@ struct ast_frame *ast_trans_frameout(struct ast_trans_pvt *pvt,
f->offset = AST_FRIENDLY_OFFSET;
f->src = pvt->t->name;
f->data = pvt->outbuf;
return f;
/* We must clone the frame, because the pvt could disappear
* the moment after we return (and unlock the source channel).
*/
return ast_frisolate(f);
}
static struct ast_frame *default_frameout(struct ast_trans_pvt *pvt)