[asterisk-commits] wedhorn: trunk r348849 - /trunk/channels/chan_skinny.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 22 15:13:01 CST 2011


Author: wedhorn
Date: Thu Dec 22 15:12:57 2011
New Revision: 348849

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=348849
Log:
Fix segfault on answer.

Only update/change RTP source if RTP has already been started and 
connected to the subchannel.


Modified:
    trunk/channels/chan_skinny.c

Modified: trunk/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=348849&r1=348848&r2=348849
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Thu Dec 22 15:12:57 2011
@@ -4812,10 +4812,14 @@
 	case AST_CONTROL_PROCEEDING:
 		break;
 	case AST_CONTROL_SRCUPDATE:
-		ast_rtp_instance_update_source(sub->rtp);
+		if (sub->rtp) {
+			ast_rtp_instance_update_source(sub->rtp);
+		}
 		break;
 	case AST_CONTROL_SRCCHANGE:
-		ast_rtp_instance_change_source(sub->rtp);
+		if (sub->rtp) {
+			ast_rtp_instance_change_source(sub->rtp);
+		}
 		break;
 	case AST_CONTROL_CONNECTED_LINE:
 		update_connectedline(sub, data, datalen);




More information about the asterisk-commits mailing list