[asterisk-bugs] [Asterisk 0014812]: ast_read() used with incorrect ast_waitfor() in app_fax.c

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Apr 3 06:39:44 CDT 2009


The following issue has been set as RELATED TO issue 0014769. 
====================================================================== 
http://bugs.digium.com/view.php?id=14812 
====================================================================== 
Reported By:                caspy
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14812
Category:                   Applications/app_fax
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.0.7 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-04-02 11:36 CDT
Last Modified:              2009-04-03 06:39 CDT
====================================================================== 
Summary:                    ast_read() used with incorrect ast_waitfor() in
app_fax.c
Description: 
in 1.6.0.7 in main/channel.c some changes are made to check for correct
usage of ast_waitfor() before each ast_read().

in my case, as soon as i start ReceiveFAX() application from dialplan,
messages like this begin to flood log:
ERROR[14159] channel.c: ast_read() called with no recorded file
descriptor.


looking into transmit_audio() (and transmit_t38() too) of apps/app_fax.c
we can see this:
===
        while (!s->finished) {
                res = ast_waitfor(s->chan, 20);
                if (res < 0)
                        break;
                else if (res > 0)
                        res = 0;

                inf = ast_read(s->chan);
===

if i understand correctly, ast_waitfor() returns zero, when the is nothing
to read. but in provided code we can see that reading is still beeing
done.

am i right?
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0014769 [patch] Improvements/fixes for app_fax
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-04-03 06:39 snuffy         Relationship added       related to 0014769  
======================================================================




More information about the asterisk-bugs mailing list