[asterisk-commits] trunk r9223 - /trunk/channels/misdn/isdn_lib.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Feb 8 12:39:39 MST 2006


Author: crichter
Date: Wed Feb  8 13:39:37 2006
New Revision: 9223

URL: http://svn.digium.com/view/asterisk?rev=9223&view=rev
Log:
L2 Signalling in PTP-TE Mode fixed

Modified:
    trunk/channels/misdn/isdn_lib.c

Modified: trunk/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/isdn_lib.c?rev=9223&r1=9222&r2=9223&view=diff
==============================================================================
--- trunk/channels/misdn/isdn_lib.c (original)
+++ trunk/channels/misdn/isdn_lib.c Wed Feb  8 13:39:37 2006
@@ -635,18 +635,30 @@
 	return 0;
 }
 
-
-int misdn_lib_get_l2_status(struct misdn_stack *stack)
+int misdn_lib_get_l2_te_ptp_up(struct misdn_stack *stack)
 {
 	iframe_t act;
-	
+		
 	act.prim = DL_ESTABLISH | REQUEST;
-
-	act.addr = (stack->upper_id | FLG_MSG_DOWN)  ;
-
+	act.addr = (stack->upper_id  & ~LAYER_ID_MASK) | 3 | FLG_MSG_DOWN;
+		
 	act.dinfo = 0;
 	act.len = 0;
 	return mISDN_write(stack->midev, &act, mISDN_HEADER_LEN+act.len, TIMEOUT_1SEC);
+	return 0;
+}
+
+int misdn_lib_get_l2_status(struct misdn_stack *stack)
+{
+	iframe_t act;
+	
+	act.prim = DL_ESTABLISH | REQUEST;
+
+	act.addr = (stack->upper_id | FLG_MSG_DOWN)  ;
+
+	act.dinfo = 0;
+	act.len = 0;
+	return mISDN_write(stack->midev, &act, mISDN_HEADER_LEN+act.len, TIMEOUT_1SEC);
 }
 
 int misdn_lib_get_short_status(struct misdn_stack *stack)
@@ -656,9 +668,9 @@
 	
 	act.prim = MGR_SHORTSTATUS | REQUEST; 
 	
-	act.addr = (stack->upper_id | FLG_MSG_DOWN)  ;
-
-	act.dinfo = SSTATUS_L1;
+	act.addr = (stack->upper_id | MSG_BROADCAST)  ;
+
+	act.dinfo = SSTATUS_BROADCAST_BIT | SSTATUS_ALL;
 	
 	act.len = 0;
 	return mISDN_write(stack->midev, &act, mISDN_HEADER_LEN+act.len, TIMEOUT_1SEC);
@@ -1129,6 +1141,7 @@
 			stack->l1link=1;
 		}
 
+		misdn_lib_get_short_status(stack);
 		misdn_lib_get_l1_up(stack);
 		misdn_lib_get_l2_up(stack);
 		
@@ -2312,6 +2325,7 @@
 		case SSTATUS_L1_ACTIVATED:
 			cb_log(1, 0, "MGMT: SSTATUS: L1_ACTIVATED \n");
 			stack->l1link=1;
+		
 			break;
 		case SSTATUS_L1_DEACTIVATED:
 			cb_log(1, 0, "MGMT: SSTATUS: L1_DEACTIVATED \n");



More information about the asterisk-commits mailing list