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

Tzafrir Cohen reviewboard at asterisk.org
Thu Feb 6 10:29:03 CST 2014


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

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/a6e20cb3/attachment.html>


More information about the asterisk-dev mailing list