[svn-commits] file: branch 1.4 r50727 - /branches/1.4/main/channel.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Jan 12 23:00:25 MST 2007


Author: file
Date: Sat Jan 13 00:00:24 2007
New Revision: 50727

URL: http://svn.digium.com/view/asterisk?view=rev&rev=50727
Log:
Only write a frame out to the channel if one exists. There are cases where one may not and would therefore cause the channel driver to segfault. (issue #8434 reported by slimey)

Modified:
    branches/1.4/main/channel.c

Modified: branches/1.4/main/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/channel.c?view=diff&rev=50727&r1=50726&r2=50727
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Sat Jan 13 00:00:24 2007
@@ -2650,8 +2650,10 @@
 			/* and now put it through the regular translator */
 			f = (chan->writetrans) ? ast_translate(chan->writetrans, f, 0) : f;
 		}
-		
-		res = chan->tech->write(chan, f);
+		if (f)
+			res = chan->tech->write(chan, f);
+		else
+			res = 0;
 		break;
 	case AST_FRAME_NULL:
 	case AST_FRAME_IAX:



More information about the svn-commits mailing list