[asterisk-dev] Review: DAHDI: fail non-blocking I/O in case of span unassignment

Tzafrir Cohen tzafrir.cohen at xorcom.com
Tue Jun 20 07:19:55 CDT 2017


The MCF/R2 in Asterisk's chan_dahdi is an example of a program that uses
non-blocking I/O with DAHDI. If you unassign a span that is used for
MFC/R2 with Asterisk, you start getting an endless loop of EAGAIN errors.
This is because in case of a non-blocking I/O read that has nothing to
return, there is no check if the span is assigned before returning
-EAGAIN.

This patch adds such tests for non-blockiing I/O (both read and write).




More information about the asterisk-dev mailing list