[asterisk-commits] crichter: trunk r68740 - in /trunk: ./ channels/ channels/misdn/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Jun 11 10:05:48 MST 2007


Author: crichter
Date: Mon Jun 11 12:05:48 2007
New Revision: 68740

URL: http://svn.digium.com/view/asterisk?view=rev&rev=68740
Log:
Merged revisions 68733 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r68733 | crichter | 2007-06-11 18:57:59 +0200 (Mo, 11 Jun 2007) | 9 lines

Merged revisions 68732 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r68732 | crichter | 2007-06-11 18:49:00 +0200 (Mo, 11 Jun 2007) | 1 line

added check for NULL Pointer when calling misdn_new. Asterisk does not allow us to create channels anymore when stop gracefully is used :). also modified the restart_indicator to 0
........

................

Modified:
    trunk/   (props changed)
    trunk/channels/chan_misdn.c
    trunk/channels/misdn/isdn_msg_parser.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_misdn.c?view=diff&rev=68740&r1=68739&r2=68740
==============================================================================
--- trunk/channels/chan_misdn.c (original)
+++ trunk/channels/chan_misdn.c Mon Jun 11 12:05:48 2007
@@ -3057,7 +3057,12 @@
 	cl->bc = newbc;
 	
 	tmp = misdn_new(cl, AST_STATE_RESERVED, ext, NULL, format, port, channel);
-	cl->ast = tmp;
+	if (!tmp) {
+		ast_log(LOG_ERROR,"Could not create Asterisk object\n");
+		return NULL;
+	}
+
+	cl->ast=tmp;
 	
 	/* register chan in local list */
 	cl_queue_chan(&cl_te, cl) ;
@@ -3959,6 +3964,13 @@
 		ch->originator = ORG_MISDN;
 
 		chan = misdn_new(ch, AST_STATE_RESERVED, bc->dad, bc->oad, AST_FORMAT_ALAW, bc->port, bc->channel);
+
+		if (!chan) {
+			misdn_lib_send_event(bc,EVENT_RELEASE_COMPLETE);
+			ast_log(LOG_ERROR, "cb_events: misdn_new failed !\n"); 
+			return 0;
+		}
+
 		ch->ast = chan;
 
 		if ((exceed = add_in_calls(bc->port))) {

Modified: trunk/channels/misdn/isdn_msg_parser.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/isdn_msg_parser.c?view=diff&rev=68740&r1=68739&r2=68740
==============================================================================
--- trunk/channels/misdn/isdn_msg_parser.c (original)
+++ trunk/channels/misdn/isdn_msg_parser.c Mon Jun 11 12:05:48 2007
@@ -839,7 +839,7 @@
 	printf("Building RESTART Msg\n"); 
 #endif
 	enc_ie_channel_id(&restart->CHANNEL_ID, msg, 1,bc->channel, nt,bc);
-	enc_ie_restart_ind(&restart->RESTART_IND, msg, 0x80, nt, bc);
+	enc_ie_restart_ind(&restart->RESTART_IND, msg, 0, nt, bc);
 
 	cb_log(0,bc->port, "Restarting channel %d\n", bc->channel);
 	return msg; 



More information about the asterisk-commits mailing list