[asterisk-commits] rmudgett: branch 1.6.1 r212768 - in /branches/1.6.1: ./ channels/misdn/

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


Author: rmudgett
Date: Tue Aug 18 11:48:01 2009
New Revision: 212768

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=212768
Log:
Merged revisions 212758 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r212758 | rmudgett | 2009-08-18 11:29:47 -0500 (Tue, 18 Aug 2009) | 9 lines
  
  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:
    branches/1.6.1/   (props changed)
    branches/1.6.1/channels/misdn/isdn_lib.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/channels/misdn/isdn_lib.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.1/channels/misdn/isdn_lib.c?view=diff&rev=212768&r1=212767&r2=212768
==============================================================================
--- branches/1.6.1/channels/misdn/isdn_lib.c (original)
+++ branches/1.6.1/channels/misdn/isdn_lib.c Tue Aug 18 11:48:01 2009
@@ -42,8 +42,6 @@
 
 struct misdn_stack* get_misdn_stack( void );
 
-static int set_chan_in_stack(struct misdn_stack *stack, int channel);
-
 int release_cr(struct misdn_stack *stack, mISDNuser_head_t *hh);
 
 int misdn_lib_port_is_pri(int port)
@@ -229,8 +227,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);
@@ -273,7 +269,6 @@
 int te_lib_init( void ) ; /* returns midev */
 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);
@@ -479,7 +474,7 @@
 
 }
 
-int set_chan_in_stack(struct misdn_stack *stack, int channel)
+static int set_chan_in_stack(struct misdn_stack *stack, int channel)
 {
 
 	cb_log(4,stack->port,"set_chan_in_stack: %d\n",channel);
@@ -560,6 +555,20 @@
 	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)
+ *
+ * \retval 0 on success.
+ * \retval -1 on error.  i.e., The channel is out of range.
+ *
+ * \note
+ * Must be called after clean_up_bc() to make sure that the media stream is
+ * no longer connected.
+ */
 static int empty_chan_in_stack(struct misdn_stack *stack, int channel)
 {
 	if (channel<=0 || channel>MAX_BCHANS) {
@@ -631,7 +640,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->dummy=0;
@@ -1476,19 +1495,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;
@@ -1504,9 +1513,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;
@@ -1524,7 +1533,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;	
@@ -3171,14 +3180,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