[asterisk-commits] oej: branch oej/rana-moh-queue-transfer-1.8 r393688 - /team/oej/rana-moh-queu...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 4 08:51:02 CDT 2013


Author: oej
Date: Thu Jul  4 08:50:59 2013
New Revision: 393688

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393688
Log:
Fixing segfault. Nasty business.

Modified:
    team/oej/rana-moh-queue-transfer-1.8/channels/chan_sip.c

Modified: team/oej/rana-moh-queue-transfer-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/rana-moh-queue-transfer-1.8/channels/chan_sip.c?view=diff&rev=393688&r1=393687&r2=393688
==============================================================================
--- team/oej/rana-moh-queue-transfer-1.8/channels/chan_sip.c (original)
+++ team/oej/rana-moh-queue-transfer-1.8/channels/chan_sip.c Thu Jul  4 08:50:59 2013
@@ -23886,7 +23886,12 @@
 		/* Target chan1 is running a one-legged call, maybe queue or IVR */
 		/* If this channel is serviced by music, we need to make sure that it 
 		   continues */
-		ast_copy_string(target.chan1_musicclass, ast_moh_query(target.chan1), sizeof (target.chan1_musicclass));
+		if (target.chan1) {
+			char *musicclass = ast_moh_query(target.chan1);
+			if (musicclass != NULL) {
+				ast_copy_string(target.chan1_musicclass, musicclass, sizeof (target.chan1_musicclass));
+			}
+		}
 	}  
 
 	if (!target.chan2 || !(target.chan2->_state == AST_STATE_UP || target.chan2->_state == AST_STATE_RINGING) ) {




More information about the asterisk-commits mailing list