From 7188fd81cffe0cd2dcb2ea4f9bc87962d9e0e14b Mon Sep 17 00:00:00 2001 From: crichter Date: Fri, 18 May 2007 09:31:27 +0000 Subject: Merged revisions 58825-58826 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ................ r58825 | crichter | 2007-03-12 13:43:24 +0100 (Mo, 12 Mär 2007) | 1 line added UU transceiving and corect handling for rdnis ................ r58826 | crichter | 2007-03-12 14:08:06 +0100 (Mo, 12 Mär 2007) | 21 lines Merged revisions 57034,57523,57753,58558 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r57034 | crichter | 2007-02-28 17:09:27 +0100 (Mi, 28 Feb 2007) | 1 line fixed bugs.digium.com bugs: #9157 and bugs.beronet.com bugs: #302, #303, #304 ........ r57523 | crichter | 2007-03-02 19:32:51 +0100 (Fr, 02 Mar 2007) | 1 line fixed typo ........ r57753 | crichter | 2007-03-04 11:39:50 +0100 (So, 04 Mar 2007) | 1 line fixed another place where the out_cause was hardcoded to 16 ........ r58558 | crichter | 2007-03-09 15:43:58 +0100 (Fr, 09 Mar 2007) | 1 line we can free channel 31 as well, since we can occupy it ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@64951 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/misdn/isdn_lib.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'channels/misdn/isdn_lib.c') diff --git a/channels/misdn/isdn_lib.c b/channels/misdn/isdn_lib.c index 7294f8f56..530731102 100644 --- a/channels/misdn/isdn_lib.c +++ b/channels/misdn/isdn_lib.c @@ -463,7 +463,7 @@ static int find_free_chan_in_stack(struct misdn_stack *stack, struct misdn_bchan static int empty_chan_in_stack(struct misdn_stack *stack, int channel) { - if (channel<=0 || channel>=MAX_BCHANS) { + if (channel<=0 || channel>MAX_BCHANS) { cb_log(0,stack?stack->port:0, "empty_chan_in_stack: cannot empty channel %d\n",channel); return -1; } @@ -618,6 +618,8 @@ static void empty_bc(struct misdn_bchannel *bc) bc->dad[0] = 0; bc->rad[0] = 0; bc->orig_dad[0] = 0; + bc->uu[0]=0; + bc->uulen=0; bc->fac_in.Function = Fac_None; bc->fac_out.Function = Fac_None; @@ -1533,8 +1535,10 @@ static int handle_event ( struct misdn_bchannel *bc, enum event_e event, iframe_ if (bc->channel>0) empty_chan_in_stack(stack,bc->channel); int tmpcause=bc->cause; + int tmp_out_cause=bc->out_cause; empty_bc(bc); bc->cause=tmpcause; + bc->out_cause=tmp_out_cause; clean_up_bc(bc); break; default: @@ -3082,6 +3086,9 @@ struct misdn_bchannel* misdn_lib_get_free_bc(int port, int channel, int inout) } int maxnum=inout&&!stack->pri&&!stack->ptp?stack->b_num+1:stack->b_num; + //int maxnum=stack->b_num+1; + + cb_log(0,0,"maxnum:%d",maxnum); for (i = 0; i bc[i].in_use) { /* 3. channel on bri means CW*/ @@ -3322,8 +3329,10 @@ int misdn_lib_send_event(struct misdn_bchannel *bc, enum event_e event ) if (bc->channel>0) empty_chan_in_stack(stack,bc->channel); int tmpcause=bc->cause; + int tmp_out_cause=bc->out_cause; empty_bc(bc); bc->cause=tmpcause; + bc->out_cause=tmp_out_cause; clean_up_bc(bc); } break; -- cgit v1.2.3