[asterisk-dev] [Code Review] 3192: chan_dahdi: handle DAHDI_EVENT_REMOVED on a pri D-Channel

rmudgett reviewboard at asterisk.org
Thu Feb 6 13:04:39 CST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3192/#review10796
-----------------------------------------------------------

Ship it!


Use svn merge to backport the revisions -r394552 and -r394567 for the patch so comparing the files between version does not show up unnecessary differences.  Also you should use the commit message from -r394552 adding a note indicating that the change was backported.

You will need to manually close this review when you commit because autoclosing of reviews is currently broken.

- rmudgett


On Feb. 6, 2014, 10:29 a.m., Tzafrir Cohen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3192/
> -----------------------------------------------------------
> 
> (Updated Feb. 6, 2014, 10:29 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This is a request to backport code from https://reviewboard.asterisk.org/r/726/ to the stable branches (1.8 and 11).
> 
> 726 is about handling a DAHDI event called DAHDI_EVENT_REMOVED on the D-channel. It was committed in r394552 (and r394567) which are also included in branch 12. It was followed by a releated and complementing change - r396474 ("chan_dahdi: create channels at run-time" , review 1598). The latter would probably considered as a new feature and not considered to backport.
> 
> The issue it is aimed to fix:
> 
> When we disconnect a DAHDI device[1], userspace devices can no longer read from its channels. DAHDI still keep minimal stubs that answer -ENODEV to each relevant system call. DAHDI also sends to userspace the event DAHDI_EVENT_REMOVE on each channel. Asterisk already knows to remove channels when it gets those events. This deals with analog channels, CAS, and MFC/R2. It also deals with the B-channels of an ISDN span. But the D-channel is left open and keeps flooding the log with the following line:
> 
>   [Feb  6 18:06:22] ERROR[9169] chan_dahdi.c: PRI Span: 2 Read on 95 failed: No such device
> 
> which confusingly comes from libpri, as pri.c:__pri_read() does not pass the errno it gets on.
> 
> Applying the reviewed code fixes the issue. This problem has become even simpler to trigger with the introduction of dahdi_span_assignment, though it has been around earlier on.
> 
> [1] physically disconnect, 'rmmod xpp_usb' on and astribank, and with recent DAHDI versions: 'dahdi_span_assignments remove'
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/channels/chan_dahdi.c 407565 
> 
> Diff: https://reviewboard.asterisk.org/r/3192/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Tzafrir Cohen
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140206/454e30b3/attachment.html>


More information about the asterisk-dev mailing list