[asterisk-bugs] [JIRA] (ASTERISK-26749) chan_dahdi.c: my_dahdi_write() returns zero even if it fails.

Segii Cherkavskyi (JIRA) noreply at issues.asterisk.org
Wed Jan 25 15:33:10 CST 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=234876#comment-234876 ] 

Segii Cherkavskyi commented on ASTERISK-26749:
----------------------------------------------

Thank you for the patch, Richard! 

Is this an issue and is going to be fixed in the recent versions of asterisk (because this code is exactly the same in asterisk 14.2.1)? Or this patch is just to try out how things will going to work in my 1.8 version of asterisk?

> chan_dahdi.c: my_dahdi_write() returns zero even if it fails. 
> --------------------------------------------------------------
>
>                 Key: ASTERISK-26749
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26749
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_dahdi
>         Environment: Gentoo Linux, asterisk 1.8.31.1
>            Reporter: Segii Cherkavskyi
>            Assignee: Richard Mudgett
>         Attachments: asterisk-15-12-2017-10-02-55.log, jira_asterisk_26749_v13.patch
>
>
> Although my asterisk version is not the newest, I checked chan_dahdi.c in the more recent asterisk version (13) and the code in question is remained untouched, so here is the problem: 
> apps/chan_dahdi.c has a method my_dahdi_write(), which returns zero, even if writing to a file descriptor fails. In case of failure my_dahdi_write() produces the following log output:
> {noformat}
> chan_dahdi.c: Write returned -1 (Resource temporarily unavailable) on channel 4
> {noformat}
> The return value of the method my_dahdi_write() is checked by the calling function dahdi_write() and this function returns with -1, in case if my_dahdi_write() fails, which never happens. 
> While searching through the asterisk issue tracker, I found similar logs to the one I have, with discussions about echo cancellation etc. not directly discussing the return value of my_dahdi_write().



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list