[asterisk-bugs] [Asterisk 0019251]: [patch] Framehooks ast_indicate_data Incorectly uses "read" this should be "write"

Asterisk Bug Tracker noreply at bugs.digium.com
Mon May 9 05:33:21 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19251 
====================================================================== 
Reported By:                irroot
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   19251
Category:                   Channels/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.8.4-rc3 
JIRA:                        
Regression:                 No 
Reviewboard Link:           https://reviewboard.asterisk.org/r/1116 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-05-09 05:20 CDT
Last Modified:              2011-05-09 05:33 CDT
====================================================================== 
Summary:                    [patch] Framehooks ast_indicate_data Incorectly uses
"read" this should be "write"
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 ...

====================================================================== 

---------------------------------------------------------------------- 
 (0134642) irroot (reporter) - 2011-05-09 05:33
 https://issues.asterisk.org/view.php?id=19251#c134642 
---------------------------------------------------------------------- 
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 ... 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-09 05:33 irroot         Note Added: 0134642                          
======================================================================




More information about the asterisk-bugs mailing list