[asterisk-users] Patch to dahdi Chans.pm

Steve Johnson stevej456 at gmail.com
Mon Feb 2 21:27:20 CST 2009


Software:
dahdi-linux-complete-2.1.0.3+2.1.0.2.tar.gz
asterisk-1.6.1-rc1.tar.gz

Hardware:
4-port fxs card

Example:
# /etc/init.d/dahdi status

### Span  1: WRTDM/0 "wrtdm Board 1" (MASTER)
  1 FXS        FXSKS       (In use)
  2 FXS        FXSKS       (In use)
  3 FXS        FXSKS       (In use)
  4 FXS        FXSKS       (In use)
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.10.0/Dahdi/Chans.pm line 221.
  5 unknown
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.10.0/Dahdi/Chans.pm line 221.
  6 unknown
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.10.0/Dahdi/Chans.pm line 221.
  7 unknown
[..]
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.10.0/Dahdi/Chans.pm line 221.
 23 unknown
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.10.0/Dahdi/Chans.pm line 221.
 24 unknown

Problem:
$self->type is not being checked to see if it is defined.  Add a line
just above line 221 to fix this, such as:

    return undef unless defined $self->type;

After the fix, the above command executes without error.

# /etc/init.d/dahdi status
### Span  1: WRTDM/0 "wrtdm Board 1" (MASTER)
  1 FXS        FXSKS       (In use)
  2 FXS        FXSKS       (In use)
  3 FXS        FXSKS       (In use)
  4 FXS        FXSKS       (In use)
  5 unknown
  6 unknown
  7 unknown
  8 unknown
  9 unknown
 10 unknown
 11 unknown
 12 unknown
 13 unknown
 14 unknown
 15 unknown
 16 unknown
 17 unknown
 18 unknown
 19 unknown
 20 unknown
 21 unknown
 22 unknown
 23 unknown
 24 unknown

FYI...

S.



More information about the asterisk-users mailing list