[asterisk-bugs] [Asterisk 0011017]: [patch] zap restart fails to generate channels

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Aug 15 14:13:20 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11017 
====================================================================== 
Reported By:                tzafrir
Assigned To:                jpeeler
====================================================================== 
Project:                    Asterisk
Issue ID:                   11017
Category:                   Channels/chan_zap
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 86182 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2007-10-17 15:50 CDT
Last Modified:              2008-08-15 14:13 CDT
====================================================================== 
Summary:                    [patch] zap restart fails to generate channels
Description: 
The command "zap restart" has been added before 1.4 . However at some point
it has been changed to run setup_zap(2) instead of setup_zap(0) . This
makes it useless, as it can only destroy channels and not create new ones.

The attached patch fixes this, as well as other implementation issues with
zap_restart:

* Just release all the interfaces at once. The same code as in the module
unload.

* Thus we also lock the iflist when destroying channel.

* If we were listening on some file descriptors and now we don't, pfds was
still pointing to a value even though its value has been released.


With this patch a restart of analog channels work. A restart of digital
spans still fails, as there is no where in the code that D channels are
being released.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
duplicate of        0010816 errors on 'zap rsetart'
has duplicate       0012121 Zap restart fails
====================================================================== 

---------------------------------------------------------------------- 
 (0091454) svnbot (reporter) - 2008-08-15 14:13
 http://bugs.digium.com/view.php?id=11017#c91454 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 138119

U   branches/1.4/channels/chan_dahdi.c

------------------------------------------------------------------------
r138119 | jpeeler | 2008-08-15 14:13:11 -0500 (Fri, 15 Aug 2008) | 4 lines

Fixes the dahdi restart functionality. Dahdi restart allows one to restart
all DAHDI channels, even if they are currently in use. This is different
from unloading and then loading the module since unloading requires the use
count to be zero. Reloading the module is different in that the signalling
is not changed from what it was originally configured. Also, this fixes not
closing all the file descriptors for D-channels upon module unload (which
would prevent loading the module afterwards).

(closes issue http://bugs.digium.com/view.php?id=11017)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=138119 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-15 14:13 svnbot         Note Added: 0091454                          
======================================================================




More information about the asterisk-bugs mailing list