aboutsummaryrefslogtreecommitdiffstats
path: root/channels/misdn
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-18 16:29:47 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-18 16:29:47 +0000
commita006d1d1a62e9f4255221203c34276c2f60a945d (patch)
tree50a4f6ecde817c0d80de2313d0efec5b10138a09 /channels/misdn
parent99b05e8bf4e20dd7fa72c836894ff2735d9532b0 (diff)
Merged revisions 212727 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r212727 | rmudgett | 2009-08-18 11:00:56 -0500 (Tue, 18 Aug 2009) | 1 line Removed some deadwood and added some doxygen comments. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@212758 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/misdn')
-rw-r--r--channels/misdn/isdn_lib.c54
1 files changed, 28 insertions, 26 deletions
diff --git a/channels/misdn/isdn_lib.c b/channels/misdn/isdn_lib.c
index 835f75cf6..43c69ddff 100644
--- a/channels/misdn/isdn_lib.c
+++ b/channels/misdn/isdn_lib.c
@@ -238,8 +238,6 @@ void misdn_tx_jitter(struct misdn_bchannel *bc, int len);
struct misdn_bchannel *find_bc_by_l3id(struct misdn_stack *stack, unsigned long l3id);
-struct misdn_bchannel *find_bc_by_confid(unsigned long confid);
-
int setup_bc(struct misdn_bchannel *bc);
int manager_isdn_handler(iframe_t *frm ,msg_t *msg);
@@ -281,7 +279,6 @@ struct misdn_bchannel *stack_holder_find(struct misdn_stack *stack, unsigned lon
/* user iface */
void te_lib_destroy(int midev) ;
struct misdn_bchannel *manager_find_bc_by_pid(int pid);
-struct misdn_bchannel *manager_find_bc_holded(struct misdn_bchannel* bc);
void manager_ph_control_block(struct misdn_bchannel *bc, int c1, void *c2, int c2_len);
void manager_clean_bc(struct misdn_bchannel *bc );
void manager_bchannel_setup (struct misdn_bchannel *bc);
@@ -591,6 +588,19 @@ static int find_free_chan_in_stack(struct misdn_stack *stack, struct misdn_bchan
return 0;
}
+/*!
+ * \internal
+ * \brief Release a B channel to the allocation pool.
+ *
+ * \param stack Which port stack B channel belongs.
+ * \param channel B channel to release. (Range 1-MAX_BCHANS representing B1-Bn)
+ *
+ * \return Nothing
+ *
+ * \note
+ * Must be called after clean_up_bc() to make sure that the media stream is
+ * no longer connected.
+ */
static void empty_chan_in_stack(struct misdn_stack *stack, int channel)
{
if (channel < 1 || ARRAY_LEN(stack->channels) < channel) {
@@ -661,7 +671,17 @@ static void bc_next_state_change(struct misdn_bchannel *bc, enum bchannel_state
bc->next_bc_state=state;
}
-
+/*!
+ * \internal
+ * \brief Empty the B channel record of most call data.
+ *
+ * \param bc B channel record to empty of most call data.
+ *
+ * \return Nothing
+ *
+ * \note
+ * Sets the last_used time and must be called before clearing bc->in_use.
+ */
static void empty_bc(struct misdn_bchannel *bc)
{
bc->caller.presentation = 0; /* allowed */
@@ -1563,19 +1583,9 @@ struct misdn_bchannel *find_bc_by_l3id(struct misdn_stack *stack, unsigned long
return stack_holder_find(stack, l3id);
}
-static struct misdn_bchannel *find_bc_holded(struct misdn_stack *stack)
-{
- int i;
- for (i=0; i<=stack->b_num; i++) {
- if (stack->bc[i].holded ) return &stack->bc[i] ;
- }
- return NULL;
-}
-
-
static struct misdn_bchannel *find_bc_by_addr(unsigned long addr)
{
- struct misdn_stack* stack;
+ struct misdn_stack *stack;
int i;
for (stack=glob_mgr->stack_list;
@@ -1591,9 +1601,9 @@ static struct misdn_bchannel *find_bc_by_addr(unsigned long addr)
return NULL;
}
-struct misdn_bchannel *find_bc_by_confid(unsigned long confid)
+static struct misdn_bchannel *find_bc_by_confid(unsigned long confid)
{
- struct misdn_stack* stack;
+ struct misdn_stack *stack;
int i;
for (stack=glob_mgr->stack_list;
@@ -1611,7 +1621,7 @@ struct misdn_bchannel *find_bc_by_confid(unsigned long confid)
static struct misdn_bchannel *find_bc_by_channel(int port, int channel)
{
- struct misdn_stack* stack=find_stack_by_port(port);
+ struct misdn_stack *stack = find_stack_by_port(port);
int i;
if (!stack) return NULL;
@@ -3246,14 +3256,6 @@ struct misdn_bchannel *manager_find_bc_by_pid(int pid)
return NULL;
}
-struct misdn_bchannel *manager_find_bc_holded(struct misdn_bchannel* bc)
-{
- struct misdn_stack *stack=get_stack_by_bc(bc);
- return find_bc_holded(stack);
-}
-
-
-
static int test_inuse(struct misdn_bchannel *bc)
{
struct timeval now;