Summary: | ASTERISK-14833: crash on second 'dahdi destroy channel' if a var was set | ||
Reporter: | Tzafrir Cohen (tzafrir) | Labels: | |
Date Opened: | 2009-09-15 06:19:07 | Date Closed: | 2009-10-06 15:41:03 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_dahdi |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | dell*CLI> dahdi destroy channel 1 dell*CLI> dahdi destroy channel 2 dell*CLI> Disconnected from Asterisk server Executing last minute cleanups Asterisk ending (0). It will crash this way if any variable was set in chan_dahdi.conf using setvar. This is because of the following in chan_dahdi.c:11259 (function mkintf) if (conf->chan.vars) { tmp->vars = conf->chan.vars; } conf->chan.vars is thus common to all channels. Fix should be to copy each variable seperately. | ||
Comments: | By: Jeff Peeler (jpeeler) 2009-10-05 18:34:30 How about just freeing the vars only if the last channel is being destroyed? By: Digium Subversion (svnbot) 2009-10-06 14:28:14 Repository: asterisk Revision: 222298 U trunk/channels/chan_dahdi.c ------------------------------------------------------------------------ r222298 | jpeeler | 2009-10-06 14:28:14 -0500 (Tue, 06 Oct 2009) | 9 lines Fix crash during destruction of second channel when variable set with setvar. The setvar line in chan_dahdi.conf is shared among all the channels, so make sure to only free the resources only when the last channel is destroyed. (closes issue ASTERISK-14833) Reported by: tzafrir ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=222298 By: Digium Subversion (svnbot) 2009-10-06 14:29:25 Repository: asterisk Revision: 222302 _U branches/1.6.0/ U branches/1.6.0/channels/chan_dahdi.c ------------------------------------------------------------------------ r222302 | jpeeler | 2009-10-06 14:29:25 -0500 (Tue, 06 Oct 2009) | 15 lines Merged revisions 222298 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r222298 | jpeeler | 2009-10-06 14:24:59 -0500 (Tue, 06 Oct 2009) | 9 lines Fix crash during destruction of second channel when variable set with setvar. The setvar line in chan_dahdi.conf is shared among all the channels, so make sure to only free the resources only when the last channel is destroyed. (closes issue ASTERISK-14833) Reported by: tzafrir ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=222302 By: Digium Subversion (svnbot) 2009-10-06 14:30:12 Repository: asterisk Revision: 222303 _U branches/1.6.1/ U branches/1.6.1/channels/chan_dahdi.c ------------------------------------------------------------------------ r222303 | jpeeler | 2009-10-06 14:30:12 -0500 (Tue, 06 Oct 2009) | 15 lines Merged revisions 222298 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r222298 | jpeeler | 2009-10-06 14:24:59 -0500 (Tue, 06 Oct 2009) | 9 lines Fix crash during destruction of second channel when variable set with setvar. The setvar line in chan_dahdi.conf is shared among all the channels, so make sure to only free the resources only when the last channel is destroyed. (closes issue ASTERISK-14833) Reported by: tzafrir ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=222303 By: Digium Subversion (svnbot) 2009-10-06 14:30:45 Repository: asterisk Revision: 222304 _U branches/1.6.2/ U branches/1.6.2/channels/chan_dahdi.c ------------------------------------------------------------------------ r222304 | jpeeler | 2009-10-06 14:30:45 -0500 (Tue, 06 Oct 2009) | 15 lines Merged revisions 222298 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r222298 | jpeeler | 2009-10-06 14:24:59 -0500 (Tue, 06 Oct 2009) | 9 lines Fix crash during destruction of second channel when variable set with setvar. The setvar line in chan_dahdi.conf is shared among all the channels, so make sure to only free the resources only when the last channel is destroyed. (closes issue ASTERISK-14833) Reported by: tzafrir ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=222304 By: Digium Subversion (svnbot) 2009-10-06 15:38:34 Repository: asterisk Revision: 222351 U trunk/channels/chan_dahdi.c ------------------------------------------------------------------------ r222351 | jpeeler | 2009-10-06 15:38:33 -0500 (Tue, 06 Oct 2009) | 9 lines Fix 222298 (crash during destruction of second channel when variable set with setvar). I mistakenly reasoned that setvar would be used on all channels. Since it can be set per channel, give each dahdi channel a copy of the variable. (related to ASTERISK-14833) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=222351 By: Digium Subversion (svnbot) 2009-10-06 15:39:23 Repository: asterisk Revision: 222352 _U branches/1.6.0/ U branches/1.6.0/channels/chan_dahdi.c ------------------------------------------------------------------------ r222352 | jpeeler | 2009-10-06 15:39:23 -0500 (Tue, 06 Oct 2009) | 15 lines Merged revisions 222351 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r222351 | jpeeler | 2009-10-06 15:35:19 -0500 (Tue, 06 Oct 2009) | 9 lines Fix 222298 (crash during destruction of second channel when variable set with setvar). I mistakenly reasoned that setvar would be used on all channels. Since it can be set per channel, give each dahdi channel a copy of the variable. (related to ASTERISK-14833) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=222352 By: Digium Subversion (svnbot) 2009-10-06 15:39:55 Repository: asterisk Revision: 222353 _U branches/1.6.1/ U branches/1.6.1/channels/chan_dahdi.c ------------------------------------------------------------------------ r222353 | jpeeler | 2009-10-06 15:39:55 -0500 (Tue, 06 Oct 2009) | 15 lines Merged revisions 222351 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r222351 | jpeeler | 2009-10-06 15:35:19 -0500 (Tue, 06 Oct 2009) | 9 lines Fix 222298 (crash during destruction of second channel when variable set with setvar). I mistakenly reasoned that setvar would be used on all channels. Since it can be set per channel, give each dahdi channel a copy of the variable. (related to ASTERISK-14833) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=222353 By: Digium Subversion (svnbot) 2009-10-06 15:41:03 Repository: asterisk Revision: 222354 _U branches/1.6.2/ U branches/1.6.2/channels/chan_dahdi.c ------------------------------------------------------------------------ r222354 | jpeeler | 2009-10-06 15:41:02 -0500 (Tue, 06 Oct 2009) | 15 lines Merged revisions 222351 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r222351 | jpeeler | 2009-10-06 15:35:19 -0500 (Tue, 06 Oct 2009) | 9 lines Fix 222298 (crash during destruction of second channel when variable set with setvar). I mistakenly reasoned that setvar would be used on all channels. Since it can be set per channel, give each dahdi channel a copy of the variable. (related to ASTERISK-14833) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=222354 |