fixed bugs.digium.com bugs: #9157 and bugs.beronet.com bugs: #302, #303, #304

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Christian Richter
2007-02-28 16:09:27 +00:00
parent 7312a2eb3d
commit 93c0385bc0
2 changed files with 8 additions and 7 deletions

View File

@@ -1986,12 +1986,8 @@ static int misdn_indication(struct ast_channel *ast, int cond)
chan_misdn_log(1, p->bc->port, " --> * IND :\tcongestion pid:%d\n",p->bc?p->bc->pid:-1); chan_misdn_log(1, p->bc->port, " --> * IND :\tcongestion pid:%d\n",p->bc?p->bc->pid:-1);
p->bc->out_cause=42; p->bc->out_cause=42;
if (p->state != MISDN_CONNECTED) { start_bc_tones(p);
start_bc_tones(p); misdn_lib_send_event( p->bc, EVENT_DISCONNECT);
misdn_lib_send_event( p->bc, EVENT_RELEASE);
} else {
misdn_lib_send_event( p->bc, EVENT_DISCONNECT);
}
if (p->bc->nt) { if (p->bc->nt) {
hanguptone_indicate(p); hanguptone_indicate(p);
@@ -3385,7 +3381,9 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
if ( stop_tone ) { if ( stop_tone ) {
stop_indicate(ch); stop_indicate(ch);
} }
if (!ch->ast) break;
if (ch->state == MISDN_WAITING4DIGS ) { if (ch->state == MISDN_WAITING4DIGS ) {
/* Ok, incomplete Setup, waiting till extension exists */ /* Ok, incomplete Setup, waiting till extension exists */
@@ -4340,6 +4338,7 @@ int unload_module(void)
ast_cli_unregister(&cli_show_stacks); ast_cli_unregister(&cli_show_stacks);
ast_cli_unregister(&cli_port_block); ast_cli_unregister(&cli_port_block);
ast_cli_unregister(&cli_port_unblock); ast_cli_unregister(&cli_port_unblock);
ast_cli_unregister(&cli_restart_port);
ast_cli_unregister(&cli_restart_pid); ast_cli_unregister(&cli_restart_pid);
ast_cli_unregister(&cli_port_up); ast_cli_unregister(&cli_port_up);
ast_cli_unregister(&cli_port_down); ast_cli_unregister(&cli_port_down);

View File

@@ -1507,8 +1507,10 @@ int handle_event ( struct misdn_bchannel *bc, enum event_e event, iframe_t *frm)
if (bc->channel>0) if (bc->channel>0)
empty_chan_in_stack(stack,bc->channel); empty_chan_in_stack(stack,bc->channel);
int tmpcause=bc->cause; int tmpcause=bc->cause;
int tmp_out_cause=bc->out_cause;
empty_bc(bc); empty_bc(bc);
bc->cause=tmpcause; bc->cause=tmpcause;
bc->out_cause=tmpcause;
clean_up_bc(bc); clean_up_bc(bc);
break; break;
default: default: