dahdi-linux/xpp/perl_modules/Dahdi
Shaun Ruffell caa8c947b7 Span.pm: Process the /proc/dahdi/<x> files atomically.
It is possible that the contents of the proc files can change while the
perl modules are in the processing of processing them.

Specifically, if lsdahdi is called on boot before the channels are
configured, the channel will be "probed" to determine if it's an FXO or
FXS channel and that can result in the output of proc changing. When the
size of proc changes, the script can get confused about where the
beginning of the next line is.

This patch reads in the proc file completely into memory first, and then
starts processing each of the lines.

This resolves the "Unrecognized garbage 'INACTIVE)' in -" that is
displayed on boot with the recent trunk of DAHDI.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10040 17933a7a-c749-41c5-a318-cba88f637d49
2011-07-12 23:01:02 +00:00
..
Config dahdi-perl: more left-over $span->xpd 2011-02-06 18:39:57 +00:00
Hardware dahdi-perl: fix xpp driver in dahdi_hardware 2011-01-25 10:11:36 +00:00
Xpp xpp: support loading Octasic EC firmware 2011-07-10 16:25:18 +00:00
Chans.pm dahdi-perl: more left-over $span->xpd 2011-02-06 18:39:57 +00:00
Hardware.pm Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
Span.pm Span.pm: Process the /proc/dahdi/<x> files atomically. 2011-07-12 23:01:02 +00:00
Utils.pm Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
Xpp.pm fix registration order for more than 9 Astribanks 2011-06-23 17:33:43 +00:00