Summary:ASTERISK-11535: [patch] chan_vpb segfaults if no cards found
Reporter:Mark Mickan (mmickan)Labels:
Date Opened:2008-02-28 00:27:26.000-0600Date Closed:2008-02-28 08:38:52.000-0600
Versions:Frequency of
Environment:Attachments:( 0) chan_vpb.cc.diff
Description:On startup of Asterisk, if chan_vpb is loaded without any Voicetronix cards in the system, it crashes Asterisk.  The same also happens if cards or ports are declared in vpb.conf that don't exist (or if the appropriate vpb driver is not loaded).

This patch checks the number of cards and ports.  If there are no cards detected, then chan_vpb declines to load so we get a warning rather than a segfault.  If there are cards and/or ports declared in /etc/asterisk/vpb.conf that don't exist, then chan_vpb fails out of the module load with a warning rather than a segfault.

This fixes the Debian bug reported at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466729
Comments:By: Digium Subversion (svnbot) 2008-02-28 08:38:52.000-0600

Repository: asterisk
Revision: 104974

U   trunk/channels/chan_vpb.cc

r104974 | tilghman | 2008-02-28 08:38:48 -0600 (Thu, 28 Feb 2008) | 6 lines

Fix crash when configuration does not match hardware detection.
(closes issue ASTERISK-11535)
Reported by: mmickan
      chan_vpb.cc.diff uploaded by mmickan (license 400)