From: Matthew Nicholson Date: Mon, 9 May 2011 14:09:38 +0000 (+0000) Subject: Make indicate/control frames WRITE events on framehooks. Also, if a framehook X-Git-Tag: 1.8.5-rc1~11^2~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bfd90d329aa0e4ce53abb8f3c954d5628c0d91d;p=thirdparty%2Fasterisk.git Make indicate/control frames WRITE events on framehooks. Also, if a framehook returns a non-control frame, don't forward it to the channel. (closes issue #19251) Reported by: irroot Patches: (modified) framehook_indicate.patch2 uploaded by irroot (license 52) Tested by: irroot git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318142 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/channel.c b/main/channel.c index f055a04606..5025f0cd66 100644 --- a/main/channel.c +++ b/main/channel.c @@ -4268,7 +4268,9 @@ int ast_indicate_data(struct ast_channel *chan, int _condition, awesome_frame = ast_frdup(&frame); /* who knows what we will get back! the anticipation is killing me. */ - if (!(awesome_frame = ast_framehook_list_read_event(chan->framehooks, awesome_frame))) { + if (!(awesome_frame = ast_framehook_list_write_event(chan->framehooks, awesome_frame)) + || awesome_frame->frametype != AST_FRAME_CONTROL) { + res = 0; goto indicate_cleanup; }