[Asterisk-cvs] asterisk channel.c,1.73,1.73.2.1

markster at lists.digium.com markster at lists.digium.com
Wed Feb 4 17:10:12 CST 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv1792

Modified Files:
      Tag: v1-0_stable
	channel.c 
Log Message:
Don't release generator unless there is one


Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.73
retrieving revision 1.73.2.1
diff -u -d -r1.73 -r1.73.2.1
--- channel.c	31 Jan 2004 02:50:27 -0000	1.73
+++ channel.c	4 Feb 2004 23:18:49 -0000	1.73.2.1
@@ -733,7 +733,8 @@
 void ast_deactivate_generator(struct ast_channel *chan)
 {
 	if (chan->generatordata) {
-		chan->generator->release(chan, chan->generatordata);
+		if (chan->generator && chan->generator->release) 
+			chan->generator->release(chan, chan->generatordata);
 		chan->generatordata = NULL;
 		chan->generator = NULL;
 		chan->writeinterrupt = 0;
@@ -743,7 +744,8 @@
 int ast_activate_generator(struct ast_channel *chan, struct ast_generator *gen, void *params)
 {
 	if (chan->generatordata) {
-		chan->generator->release(chan, chan->generatordata);
+		if (chan->generator && chan->generator->release)
+			chan->generator->release(chan, chan->generatordata);
 		chan->generatordata = NULL;
 	}
 	ast_prod(chan);




More information about the svn-commits mailing list