[Home]

Summary:ASTERISK-11512: [patch] chan_zap fails to close file descriptors in case of an error
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2008-02-26 03:47:49.000-0600Date Closed:2008-08-26 10:47:59
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_zap
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) dahdi_close.diff
Description:Suppose I have the following zapata.conf:

[channels]
signalling = fxo_ls
channel => 1-8

But my zaptel.conf is actually:

fxoks=1-8

Asterisk would complain of incorrect signalling. But will also leave zaptel channel 1 open.

If that channel would have been closed, I could have resolved the problem by:

1. fix my configuration
2. unmodule unload chan_zap.so
3. module load chan_zap.so

But the left-over open channels require me to fully restart Asterisk.
Comments:By: Jason Parker (jparker) 2008-02-26 13:35:20.000-0600

The simple fix here would be to just zt_close() tmp->subs[SUB_REAL].zfd, but that doesn't really fix other cases where it could get "locked" open.

By: Tilghman Lesher (tilghman) 2008-08-04 10:29:08

This appears to be already fixed in current SVN.  Correct?

By: Leif Madsen (lmadsen) 2008-08-18 14:36:26

Appears to be resolved in SVN. Just re-open should you find this not to be the case. Thanks!

By: Tzafrir Cohen (tzafrir) 2008-08-21 11:47:37

In 1.4 the following still "works": a dahdi/zaptel channel with incorrect signalling. chan_dahdi will open it but fail to close it.

Maybe destroy_dahdi_pvt() should also call dahdi_close()?

By: Tzafrir Cohen (tzafrir) 2008-08-22 07:27:42

A work-in-progress patch. I'm still trying to figure out if this fixes things.

By: Tzafrir Cohen (tzafrir) 2008-08-22 10:34:19

Patch dahdi_close.diff actually works now.

By: Digium Subversion (svnbot) 2008-08-26 10:47:56

Repository: asterisk
Revision: 140056

U   branches/1.4/channels/chan_dahdi.c

------------------------------------------------------------------------
r140056 | jpeeler | 2008-08-26 10:47:55 -0500 (Tue, 26 Aug 2008) | 9 lines

(closes issue ASTERISK-11512)
Reported by: tzafrir
Patches:
     dahdi_close.diff uploaded by tzafrir (license 46)
Tested by: tzafrir, jpeeler

This patch fixes closing open file descriptors in the case of an error.


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

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