[asterisk-commits] branch crichter/0.3.0 - r8277 /team/crichter/0.3.0/channels/misdn/isdn_lib.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Jan 19 12:15:02 MST 2006


Author: crichter
Date: Thu Jan 19 13:14:59 2006
New Revision: 8277

URL: http://svn.digium.com/view/asterisk?rev=8277&view=rev
Log:
the ACK_HDLC Stuff needs to be activated explicitly. Datalinks between chan_misdn and chan_zap work quite sweet without it, but with the patch from #6251

Modified:
    team/crichter/0.3.0/channels/misdn/isdn_lib.c

Modified: team/crichter/0.3.0/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/misdn/isdn_lib.c?rev=8277&r1=8276&r2=8277&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn/isdn_lib.c (original)
+++ team/crichter/0.3.0/channels/misdn/isdn_lib.c Thu Jan 19 13:14:59 2006
@@ -540,11 +540,12 @@
 	mISDN_write_frame(stack->midev, buff, bc->addr|FLG_MSG_DOWN, MGR_DELLAYER | REQUEST, 0, 0, NULL, TIMEOUT_1SEC);
 	
 
-	
-	if (bc->ack_hdlc) {
+#ifdef ACK_HDLC	
+	if (bc->ack_hdlc ) {
 		free(bc->ack_hdlc);
 		bc->ack_hdlc=NULL;
 	}
+#endif
 	
 	
 	bc->b_stid = 0;
@@ -852,10 +853,11 @@
 		
 	} 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  ;
@@ -2089,7 +2091,6 @@
 		return 1;
 	}
 
-
 	case PH_DATA | CONFIRM:
 	case DL_DATA|CONFIRM:
 #if MISDN_DEBUG
@@ -2098,14 +2099,14 @@
 
 #endif
 		free_msg(msg);
-		
+
+#ifdef ACK_HDLC
 		if (bc->hdlc) {
 			cb_log(4,stack->port,"Acknowledge Packet\n");
 			sem_post( (sem_t*)bc->ack_hdlc);
 		}
-		
+#endif
 		return 1;
-		break;
 	case DL_DATA|RESPONSE:
 #if MISDN_DEBUG
 		cb_log(-1, stack->port, "Data response\n");
@@ -3327,13 +3328,13 @@
 	
 	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;
 }
 



More information about the asterisk-commits mailing list