diff options
author | crichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-27 12:51:03 +0000 |
---|---|---|
committer | crichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-27 12:51:03 +0000 |
commit | a029017f157cfd3b0b6bcbf3e64fa096a500f7d4 (patch) | |
tree | 7ba8759195dab244c60ffb490b8fcbdb81b9e623 /channels/chan_misdn.c | |
parent | f852fab05d7f5c541f884381fe0b1d6a2b94621e (diff) |
fixed a bug which led to chan_list zombies, when the call could not be properly established in misdn_call. also removed the ACK_HDLC stuff which is not really needed.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@43764 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r-- | channels/chan_misdn.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index d94b33690..111a2e121 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -102,7 +102,7 @@ int misdn_jb_empty(struct misdn_jb *jb, char *data, int len); enum misdn_chan_state { - MISDN_NOTHING, /*!< at beginning */ + MISDN_NOTHING=0, /*!< at beginning */ MISDN_WAITING4DIGS, /*!< when waiting for infos */ MISDN_EXTCANTMATCH, /*!< when asterisk couldnt match our ext */ MISDN_DIALING, /*!< when pbx_start */ @@ -1651,8 +1651,6 @@ static int misdn_call(struct ast_channel *ast, char *dest, int timeout) else chan_misdn_log(2,port,"NO OPTS GIVEN\n"); - ch->state=MISDN_CALLING; - r=misdn_lib_send_event( newbc, EVENT_SETUP ); /** we should have l3id after sending setup **/ @@ -1673,6 +1671,8 @@ static int misdn_call(struct ast_channel *ast, char *dest, int timeout) ast->hangupcause=16; if (newbc->nt) stop_bc_tones(ch); + + ch->state=MISDN_CALLING; return 0; } @@ -1974,9 +1974,9 @@ static int misdn_hangup(struct ast_channel *ast) bc=p->bc; - if (ast->_state == AST_STATE_RESERVED) { + if (ast->_state == AST_STATE_RESERVED || p->state == MISDN_NOTHING) { /* between request and call */ - ast_log(LOG_DEBUG, "State Reserved => chanIsAvail\n"); + ast_log(LOG_DEBUG, "State Reserved (or nothing) => chanIsAvail\n"); MISDN_ASTERISK_TECH_PVT(ast)=NULL; cl_dequeue_chan(&cl_te, p); @@ -3724,10 +3724,10 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data) cb_log(1,bc->port," --> found holded ch\n"); if (ch->state == MISDN_CONNECTED ) { misdn_transfer_bc(ch, holded_ch) ; + hangup_chan(ch); + // release_chan(bc); + break; } - hangup_chan(ch); - release_chan(bc); - break; } stop_bc_tones(ch); |