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
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@68733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Christian Richter
2007-06-11 16:57:59 +00:00
parent 080acbfd16
commit 48f8dc5340
2 changed files with 13 additions and 1 deletions

View File

@@ -3170,6 +3170,11 @@ static struct ast_channel *misdn_request(const char *type, int format, void *dat
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 */
@@ -4103,6 +4108,13 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
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))) {