From 0242a69b3f6f7bc9fa884d51f89988e3e3ef550d Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Fri, 2 Dec 2005 01:01:11 +0000 Subject: Merged revisions 7265-7266,7268-7275 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7265 | oej | 2005-12-01 17:18:14 -0600 (Thu, 01 Dec 2005) | 2 lines Changing bug report address to the Asterisk issue tracker ........ r7266 | kpfleming | 2005-12-01 17:18:29 -0600 (Thu, 01 Dec 2005) | 3 lines Makefile 'update' target now supports updating from Subversion repositories (issue #5875) remove support for 'patches' subdirectory, it's no longer useful ........ r7268 | kpfleming | 2005-12-01 17:34:58 -0600 (Thu, 01 Dec 2005) | 2 lines ensure channel's scheduling context is freed (issue #5788) ........ r7269 | kpfleming | 2005-12-01 17:49:44 -0600 (Thu, 01 Dec 2005) | 2 lines don't block waiting for the Festival server forever when it goes away (issue #5882) ........ r7270 | kpfleming | 2005-12-01 18:26:12 -0600 (Thu, 01 Dec 2005) | 2 lines allow variables to exist on both 'halves' of the Local channel (issue #5810) ........ r7271 | kpfleming | 2005-12-01 18:28:48 -0600 (Thu, 01 Dec 2005) | 2 lines protect agent_bridgedchannel() from segfaulting when there is no bridged channel (issue #5879) ........ r7272 | kpfleming | 2005-12-01 18:39:00 -0600 (Thu, 01 Dec 2005) | 3 lines properly handle password changes when mailbox is last line of config file and not followed by a newline (issue #5870) reformat password changing code to conform to coding guidelines (issue #5870) ........ r7273 | kpfleming | 2005-12-01 18:42:40 -0600 (Thu, 01 Dec 2005) | 2 lines allow previous context-searching behavior to be used if desired (issue #5899) ........ r7274 | kpfleming | 2005-12-01 18:51:15 -0600 (Thu, 01 Dec 2005) | 2 lines inherit channel variables into channels created by Page() application (issue #5888) ........ r7275 | oej | 2005-12-01 18:52:13 -0600 (Thu, 01 Dec 2005) | 2 lines Bug #5907. Improve SIP INFO DTMF debugging output. (1.2 & Trunk) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7276 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channel.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'channel.c') diff --git a/channel.c b/channel.c index e86afb25e..85a2882ff 100644 --- a/channel.c +++ b/channel.c @@ -909,8 +909,11 @@ void ast_channel_free(struct ast_channel *chan) free(chan->tech_pvt); } + if (chan->sched) + sched_context_destroy(chan->sched); + ast_copy_string(name, chan->name, sizeof(name)); - + /* Stop monitoring */ if (chan->monitor) { chan->monitor->stop( chan, 0 ); @@ -1294,8 +1297,10 @@ int ast_hangup(struct ast_channel *chan) ast_closestream(chan->stream); if (chan->vstream) /* Close video stream */ ast_closestream(chan->vstream); - if (chan->sched) + if (chan->sched) { sched_context_destroy(chan->sched); + chan->sched = NULL; + } if (chan->generatordata) /* Clear any tone stuff remaining */ chan->generator->release(chan, chan->generatordata); -- cgit v1.2.3