[asterisk-commits] crichter: branch 1.4 r71214 - in /branches/1.4: ./ channels/ channels/misdn/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jun 22 17:44:42 CDT 2007
Author: crichter
Date: Fri Jun 22 17:44:42 2007
New Revision: 71214
URL: http://svn.digium.com/view/asterisk?view=rev&rev=71214
Log:
Merged revisions 70341 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r70341 | crichter | 2007-06-20 17:29:09 +0200 (Mi, 20 Jun 2007) | 1 line
fixed a bug that was introduced by copy and paste in the last commit ..bchannels weren't cleaned properly.
........
Modified:
branches/1.4/ (props changed)
branches/1.4/channels/chan_misdn.c
branches/1.4/channels/misdn/isdn_lib.c
branches/1.4/channels/misdn/isdn_lib.h
Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: branches/1.4/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_misdn.c?view=diff&rev=71214&r1=71213&r2=71214
==============================================================================
--- branches/1.4/channels/chan_misdn.c (original)
+++ branches/1.4/channels/chan_misdn.c Fri Jun 22 17:44:42 2007
@@ -1140,7 +1140,7 @@
}
}
-
+ misdn_dump_chanlist();
return 0;
}
Modified: branches/1.4/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/misdn/isdn_lib.c?view=diff&rev=71214&r1=71213&r2=71214
==============================================================================
--- branches/1.4/channels/misdn/isdn_lib.c (original)
+++ branches/1.4/channels/misdn/isdn_lib.c Fri Jun 22 17:44:42 2007
@@ -424,12 +424,19 @@
int i;
for (i=0; i <= stack->b_num; i++) {
- cb_log(6, stack->port, "Idx:%d stack->cchan:%d Chan:%d\n",i,stack->channels[i], i+1);
- }
-}
-
-
-
+ cb_log(6, stack->port, "Idx:%d stack->cchan:%d in_use:%d Chan:%d\n",i,stack->channels[i], stack->bc[i].in_use, i+1);
+ }
+}
+
+
+void misdn_dump_chanlist()
+{
+ struct misdn_stack *stack=get_misdn_stack();
+ for ( ; stack; stack=stack->next) {
+ dump_chan_list(stack);
+ }
+
+}
static int find_free_chan_in_stack(struct misdn_stack *stack, struct misdn_bchannel *bc, int channel, int dec)
{
@@ -669,7 +676,6 @@
mISDN_write_frame(stack->midev, buff, bc->layer_id|FLG_MSG_TARGET|FLG_MSG_DOWN, MGR_DELLAYER | REQUEST, 0, 0, NULL, TIMEOUT_1SEC);
bc->b_stid = 0;
- bc->in_use = 0;
bc_state_change(bc, BCHAN_CLEANED);
return ret;
@@ -687,6 +693,7 @@
empty_chan_in_stack(stack,i+1);
empty_bc(&stack->bc[i]);
clean_up_bc(&stack->bc[i]);
+ stack->bc[i].in_use = 0;
}
}
@@ -1605,7 +1612,8 @@
clean_up_bc(bc);
if (channel>0)
- empty_chan_in_stack(stack,bc->channel);
+ empty_chan_in_stack(stack,channel);
+ bc->in_use=0;
dump_chan_list(stack);
@@ -1639,11 +1647,12 @@
return;
}
- if (bc->channel>0) {
+ if (bc->channel>0)
empty_chan_in_stack(stack,bc->channel);
- }
+
empty_bc(bc);
clean_up_bc(bc);
+ bc->in_use=0;
}
@@ -2061,7 +2070,7 @@
break;
case EVENT_RELEASE:
case EVENT_RELEASE_COMPLETE:
- {
+ {
int channel=bc->channel;
int tmpcause=bc->cause;
empty_bc(bc);
@@ -2069,7 +2078,8 @@
clean_up_bc(bc);
if (channel>0)
- empty_chan_in_stack(stack, bc->channel);
+ empty_chan_in_stack(stack,channel);
+ bc->in_use=0;
}
break;
@@ -2640,8 +2650,6 @@
bc->in_use=0;
cb_log(0, stack->port, "GOT IGNORE SETUP\n");
-
-
break;
case RESPONSE_OK:
cb_log(4, stack->port, "GOT SETUP OK\n");
@@ -2669,8 +2677,9 @@
set_chan_in_stack(stack,bc->channel);
} else {
if (channel>0)
- empty_chan_in_stack(stack,bc->channel);
+ empty_chan_in_stack(stack,channel);
}
+ bc->in_use=0;
}
cb_log(5, stack->port, "Freeing Msg on prim:%x \n",frm->prim);
@@ -3359,7 +3368,9 @@
clean_up_bc(bc);
if (channel>0)
- empty_chan_in_stack(stack,bc->channel);
+ empty_chan_in_stack(stack,channel);
+
+ bc->in_use=0;
}
}
@@ -3404,6 +3415,8 @@
if (channel>0)
empty_chan_in_stack(stack,channel);
+
+ bc->in_use=0;
}
break;
@@ -3703,9 +3716,11 @@
if (stack->bc[cnt].channel == i) {
empty_bc(&stack->bc[cnt]);
clean_up_bc(&stack->bc[cnt]);
+ stack->bc[cnt].in_use=0;
}
}
empty_chan_in_stack(stack, i);
+
}
@@ -4207,7 +4222,8 @@
if (bc->channel>0)
empty_chan_in_stack(stack, bc->channel);
empty_bc(bc);
-
+ bc->in_use=0;
+
cb_event(EVENT_CLEANUP, bc, NULL);
}
Modified: branches/1.4/channels/misdn/isdn_lib.h
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/misdn/isdn_lib.h?view=diff&rev=71214&r1=71213&r2=71214
==============================================================================
--- branches/1.4/channels/misdn/isdn_lib.h (original)
+++ branches/1.4/channels/misdn/isdn_lib.h Fri Jun 22 17:44:42 2007
@@ -475,5 +475,6 @@
char *bc_state2str(enum bchannel_state state);
void bc_state_change(struct misdn_bchannel *bc, enum bchannel_state state);
+void misdn_dump_chanlist(void);
#endif
More information about the asterisk-commits
mailing list