Summary: | ASTERISK-17818: [patch] Framehooks ast_indicate_data Incorectly uses "read" this should be "write" | ||
Reporter: | Gregory Hinton Nietsky (irroot) | Labels: | |
Date Opened: | 2011-05-09 05:20:57 | Date Closed: | 2011-05-09 09:11:58 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/General |
Versions: | 1.8.4 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) framehook_indicate.patch2 ( 1) framehook_indicate.patch3 | |
Description: | A framehook has 2 events relating to frames read/write a frame hook on a bridged channel can look at the write events to see the packets coming into [read] on the peer. the problem with control frames is they are not sent across the bridge using a ast_write but a ast_indicate_data so to see these packets framehook events are triggered in ast_indicate_data ... these are WRITE not READ events and causes most peculiar results ... in addition there is no certainty a AST_FRAME_CONTROL will be sent back perhaps a AST_FRAME_NULL or someother frame .... i add a sanity check ... ****** ADDITIONAL INFORMATION ****** relates to... ASTERISK-17784 ASTERISK-12667 | ||
Comments: | By: Gregory Hinton Nietsky (irroot) 2011-05-09 05:33:21 if ((!(awesome_frame = ast_framehook_list_write....))) || (awesome_frame && (awesome_frame->frametype != AST_FRAME_CONTROL))) { ok this would avoid segfault ... missed this ... the rule with framehook is anything can and probably will happen ... By: Digium Subversion (svnbot) 2011-05-09 09:09:40 Repository: asterisk Revision: 318142 U branches/1.8/main/channel.c ------------------------------------------------------------------------ r318142 | mnicholson | 2011-05-09 09:09:39 -0500 (Mon, 09 May 2011) | 9 lines 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 ASTERISK-17818) Reported by: irroot Patches: (modified) framehook_indicate.patch2 uploaded by irroot (license 52) Tested by: irroot ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=318142 By: Digium Subversion (svnbot) 2011-05-09 09:11:58 Repository: asterisk Revision: 318143 _U trunk/ U trunk/main/channel.c ------------------------------------------------------------------------ r318143 | mnicholson | 2011-05-09 09:11:58 -0500 (Mon, 09 May 2011) | 16 lines Merged revisions 318142 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r318142 | mnicholson | 2011-05-09 09:09:38 -0500 (Mon, 09 May 2011) | 9 lines 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 ASTERISK-17818) Reported by: irroot Patches: (modified) framehook_indicate.patch2 uploaded by irroot (license 52) Tested by: irroot ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=318143 |