[asterisk-commits] rmudgett: trunk r212758 - in /trunk: ./ channels/misdn/isdn_lib.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 18 11:29:52 CDT 2009


Author: rmudgett
Date: Tue Aug 18 11:29:47 2009
New Revision: 212758

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=212758
Log:
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.
........

Modified:
    trunk/   (props changed)
    trunk/channels/misdn/isdn_lib.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/misdn/isdn_lib.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/misdn/isdn_lib.c?view=diff&rev=212758&r1=212757&r2=212758
==============================================================================
--- trunk/channels/misdn/isdn_lib.c (original)
+++ trunk/channels/misdn/isdn_lib.c Tue Aug 18 11:29:47 2009
@@ -238,8 +238,6 @@
 
 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 @@
 	/* 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 @@
 	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 @@
 	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 @@
 	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 @@
 	return NULL;
 }
 
-struct misdn_bchannel *find_bc_by_confid(unsigned long confid)
-{
-	struct misdn_stack* stack;
+static struct misdn_bchannel *find_bc_by_confid(unsigned long confid)
+{
+	struct misdn_stack *stack;
 	int i;
 
 	for (stack=glob_mgr->stack_list;
@@ -1611,7 +1621,7 @@
 
 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;
@@ -3245,14 +3255,6 @@
 
 	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)
 {




More information about the asterisk-commits mailing list