[asterisk-commits] crichter: trunk r43855 - in /trunk: ./ channels/ channels/misdn/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Sep 28 04:32:33 MST 2006


Author: crichter
Date: Thu Sep 28 06:32:32 2006
New Revision: 43855

URL: http://svn.digium.com/view/asterisk?rev=43855&view=rev
Log:
Merged revisions 43852 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r43852 | crichter | 2006-09-28 13:03:05 +0200 (Do, 28 Sep 2006) | 9 lines

Merged revisions 43764 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r43764 | crichter | 2006-09-27 14:51:03 +0200 (Mi, 27 Sep 2006) | 1 line

fixed a bug which led to chan_list zombies, when the call could not be properly established in misdn_call. also removed the ACK_HDLC stuff which is not really needed.
........

................

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

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.4-merged (original)
+++ branch-1.4-merged Thu Sep 28 06:32:32 2006
@@ -1,1 +1,1 @@
-/branches/1.4:1-43376,43383,43386,43388,43392,43396,43405,43410,43422,43441,43445,43450,43454,43456,43464,43466,43469,43477,43482,43486,43489,43492,43518,43524,43553,43564,43616,43635-43702,43704-43755,43757-43800,43802-43846
+/branches/1.4:1-43376,43383,43386,43388,43392,43396,43405,43410,43422,43441,43445,43450,43454,43456,43464,43466,43469,43477,43482,43486,43489,43492,43518,43524,43553,43564,43616,43635-43702,43704-43755,43757-43800,43802-43846,43852

Modified: trunk/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_misdn.c?rev=43855&r1=43854&r2=43855&view=diff
==============================================================================
--- trunk/channels/chan_misdn.c (original)
+++ trunk/channels/chan_misdn.c Thu Sep 28 06:32:32 2006
@@ -110,7 +110,7 @@
 
 
 enum misdn_chan_state {
-	MISDN_NOTHING,		/*!< at beginning */
+	MISDN_NOTHING=0,	/*!< at beginning */
 	MISDN_WAITING4DIGS, /*!<  when waiting for infos */
 	MISDN_EXTCANTMATCH, /*!<  when asterisk couldnt match our ext */
 	MISDN_DIALING, /*!<  when pbx_start */
@@ -1917,8 +1917,6 @@
 		else
 			chan_misdn_log(2,port,"NO OPTS GIVEN\n");
 		
-		ch->state=MISDN_CALLING;
-		
 		r=misdn_lib_send_event( newbc, EVENT_SETUP );
 		
 		/** we should have l3id after sending setup **/
@@ -1939,6 +1937,8 @@
 	ast->hangupcause=16;
 	
 	if (newbc->nt) stop_bc_tones(ch);
+
+	ch->state=MISDN_CALLING;
 	
 	return 0; 
 }
@@ -2246,8 +2246,9 @@
 
 	bc=p->bc;
 	
-	if (ast->_state == AST_STATE_RESERVED) {
+	if (ast->_state == AST_STATE_RESERVED || p->state == MISDN_NOTHING) {
 		/* between request and call */
+		ast_log(LOG_DEBUG, "State Reserved (or nothing) => chanIsAvail\n");
 		MISDN_ASTERISK_TECH_PVT(ast)=NULL;
 		
 		cl_dequeue_chan(&cl_te, p);
@@ -4138,10 +4139,10 @@
 			cb_log(1,bc->port," --> found holded ch\n");
 			if  (ch->state == MISDN_CONNECTED ) {
 				misdn_transfer_bc(ch, holded_ch) ;
-			}
-			hangup_chan(ch);
-			release_chan(bc);
-			break;
+				hangup_chan(ch);
+			//	release_chan(bc);
+				break;
+			}
 		}
 		
 		stop_bc_tones(ch);

Modified: trunk/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/isdn_lib.c?rev=43855&r1=43854&r2=43855&view=diff
==============================================================================
--- trunk/channels/misdn/isdn_lib.c (original)
+++ trunk/channels/misdn/isdn_lib.c Thu Sep 28 06:32:32 2006
@@ -1005,12 +1005,6 @@
 		
 	} else if ( bc->hdlc ) {
 		cb_log(2, stack->port," --> HDLC Mode\n");
-#ifdef ACK_HDLC
-		bc->ack_hdlc=(sem_t*)malloc(sizeof(sem_t));
-		if ( sem_init((sem_t*)bc->ack_hdlc, 1, 0)<0 )
-			sem_init((sem_t*)bc->ack_hdlc, 0, 0);
-#endif
-		
 		pid.protocol[1] = ISDN_PID_L1_B_64HDLC ;
 		pid.protocol[2] = ISDN_PID_L2_B_TRANS  ;
 		pid.protocol[3] = ISDN_PID_L3_B_USER;
@@ -2481,7 +2475,6 @@
 
 #endif
 		free_msg(msg);
-		
 		return 1;
 	case DL_DATA|RESPONSE:
 #if MISDN_DEBUG
@@ -3255,7 +3248,6 @@
 		/*holded_bc->upset=0;
 		  holded_bc->active=0;*/
 		bc_state_change(holded_bc,BCHAN_CLEANED);
-		
 		cb_event( EVENT_NEW_BC, bc,  holded_bc);
 	}
 	break;
@@ -3953,13 +3945,6 @@
 	
 	cb_log(9, stack->port, "Writing %d bytes 2 mISDN\n",len);
 	r=mISDN_write(stack->midev, buf, frm->len + mISDN_HEADER_LEN, TIMEOUT_INFINIT);
-#ifdef ACK_HDLC
-	if (bc->hdlc && bc->ack_hdlc) {
-		cb_log(4,stack->port,"Awaiting Acknowledge [%d]\n",len);
-		sem_wait((sem_t*)bc->ack_hdlc);
-		cb_log(4,stack->port,"Acknowledged\n");
-	}
-#endif	
 	return 0;
 }
 

Modified: trunk/channels/misdn/isdn_lib.h
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/isdn_lib.h?rev=43855&r1=43854&r2=43855&view=diff
==============================================================================
--- trunk/channels/misdn/isdn_lib.h (original)
+++ trunk/channels/misdn/isdn_lib.h Thu Sep 28 06:32:32 2006
@@ -59,7 +59,7 @@
 
 
 
-#define MAX_BCHANS 30
+#define MAX_BCHANS 31
 
 enum bchannel_state {
 	BCHAN_CLEANED=0,
@@ -197,8 +197,6 @@
 	/* int b_addr; */
 	int layer_id;
 
-	void *ack_hdlc;
-	
 	int layer;
 	
 	/*state stuff*/



More information about the asterisk-commits mailing list