<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/3192/">https://reviewboard.asterisk.org/r/3192/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray solid;">
<tr>
<td>
<h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been marked as submitted.</h1>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By Tzafrir Cohen.</div>
<p style="color: grey;"><i>Updated Feb. 9, 2014, 7:16 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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'</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/1.8/channels/chan_dahdi.c <span style="color: grey">(407565)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3192/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>