[asterisk-commits] crichter: branch 1.2 r68732 - in
/branches/1.2/channels: ./ misdn/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Jun 11 09:49:01 MST 2007
Author: crichter
Date: Mon Jun 11 11:49:00 2007
New Revision: 68732
URL: http://svn.digium.com/view/asterisk?view=rev&rev=68732
Log:
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:
branches/1.2/channels/chan_misdn.c
branches/1.2/channels/misdn/isdn_msg_parser.c
Modified: branches/1.2/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_misdn.c?view=diff&rev=68732&r1=68731&r2=68732
==============================================================================
--- branches/1.2/channels/chan_misdn.c (original)
+++ branches/1.2/channels/chan_misdn.c Mon Jun 11 11:49:00 2007
@@ -2913,6 +2913,11 @@
cl->bc=newbc;
tmp = misdn_new(cl, AST_STATE_RESERVED, ext, NULL, format, port, channel);
+ if (!tmp) {
+ ast_log(LOG_ERROR,"Could not create Asterisk object\n");
+ return NULL;
+ }
+
cl->ast=tmp;
/* register chan in local list */
@@ -3804,6 +3809,13 @@
ch->orginator = 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;
read_config(ch, ORG_MISDN);
Modified: branches/1.2/channels/misdn/isdn_msg_parser.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/misdn/isdn_msg_parser.c?view=diff&rev=68732&r1=68731&r2=68732
==============================================================================
--- branches/1.2/channels/misdn/isdn_msg_parser.c (original)
+++ branches/1.2/channels/misdn/isdn_msg_parser.c Mon Jun 11 11:49:00 2007
@@ -803,7 +803,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);
More information about the asterisk-commits
mailing list