[svn-commits] mattf: trunk r75 - in /trunk: isup.c isup.h libss7.h

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Mar 26 09:39:42 MST 2007


Author: mattf
Date: Mon Mar 26 11:39:40 2007
New Revision: 75

URL: http://svn.digium.com/view/libss7?view=rev&rev=75
Log:
Add support for group maintenance type

Modified:
    trunk/isup.c
    trunk/isup.h
    trunk/libss7.h

Modified: trunk/isup.c
URL: http://svn.digium.com/view/libss7/trunk/isup.c?view=diff&rev=75&r1=74&r2=75
==============================================================================
--- trunk/isup.c (original)
+++ trunk/isup.c Mon Mar 26 11:39:40 2007
@@ -593,12 +593,13 @@
 
 static FUNC_RECV(circuit_group_supervision_receive)
 {
+	c->cicgroupsupervisiontype = 0x3 & parm[0];
 	return 1;
 }
 
 static FUNC_SEND(circuit_group_supervision_transmit)
 {
-	parm[0] = 0x1;
+	parm[0] = c->cicgroupsupervisiontype & 0x3;
 	return 1;
 }
 
@@ -1224,6 +1225,7 @@
 			e->e = ISUP_EVENT_CGB;
 			e->cgb.startcic = cic;
 			e->cgb.endcic = cic + c->range;
+			e->cgu.type = c->cicgroupsupervisiontype;
 
 			for (i = 0; i < (c->range + 1); i++)
 				e->cgb.status[i] = c->status[i];
@@ -1234,6 +1236,7 @@
 			e->e = ISUP_EVENT_CGU;
 			e->cgu.startcic = cic;
 			e->cgu.endcic = cic + c->range;
+			e->cgu.type = c->cicgroupsupervisiontype;
 
 			for (i = 0; i < (c->range + 1); i++)
 				e->cgu.status[i] = c->status[i];
@@ -1251,7 +1254,7 @@
 	}
 }
 
-static int isup_send_cicgroupmessage(struct ss7 *ss7, int messagetype, int begincic, int endcic, unsigned char status[])
+static int isup_send_cicgroupmessage(struct ss7 *ss7, int messagetype, int begincic, int endcic, unsigned char status[], int type)
 {
 	struct isup_call call;
 	int i;
@@ -1261,6 +1264,7 @@
 
 	call.cic = begincic;
 	call.range = endcic - begincic;
+	call.cicgroupsupervisiontype = type;
 
 	if (call.range > 31)
 		return -1;
@@ -1299,35 +1303,35 @@
 	return isup_send_message(ss7, &call, ISUP_GRA, greset_params);
 }
 
-int isup_cgb(struct ss7 *ss7, int begincic, int endcic, unsigned char state[])
+int isup_cgb(struct ss7 *ss7, int begincic, int endcic, unsigned char state[], int type)
 {
 	if (!ss7)
 		return -1;
 
-	return isup_send_cicgroupmessage(ss7, ISUP_CGB, begincic, endcic, state);
-}
-
-int isup_cgu(struct ss7 *ss7, int begincic, int endcic, unsigned char state[])
+	return isup_send_cicgroupmessage(ss7, ISUP_CGB, begincic, endcic, state, type);
+}
+
+int isup_cgu(struct ss7 *ss7, int begincic, int endcic, unsigned char state[], int type)
 {
 	if (!ss7)
 		return -1;
 
-	return isup_send_cicgroupmessage(ss7, ISUP_CGU, begincic, endcic, state);
-}
-
-int isup_cgba(struct ss7 *ss7, int begincic, int endcic, unsigned char state[])
+	return isup_send_cicgroupmessage(ss7, ISUP_CGU, begincic, endcic, state, type);
+}
+
+int isup_cgba(struct ss7 *ss7, int begincic, int endcic, unsigned char state[], int type)
 {
 	if (!ss7)
 		return -1;
-	return isup_send_cicgroupmessage(ss7, ISUP_CGBA, begincic, endcic, state);
-}
-
-int isup_cgua(struct ss7 *ss7, int begincic, int endcic, unsigned char state[])
+	return isup_send_cicgroupmessage(ss7, ISUP_CGBA, begincic, endcic, state, type);
+}
+
+int isup_cgua(struct ss7 *ss7, int begincic, int endcic, unsigned char state[], int type)
 {
 	if (!ss7)
 		return -1;
 
-	return isup_send_cicgroupmessage(ss7, ISUP_CGUA, begincic, endcic, state);
+	return isup_send_cicgroupmessage(ss7, ISUP_CGUA, begincic, endcic, state, type);
 }
 
 int isup_iam(struct ss7 *ss7, struct isup_call *c)

Modified: trunk/isup.h
URL: http://svn.digium.com/view/libss7/trunk/isup.h?view=diff&rev=75&r1=74&r2=75
==============================================================================
--- trunk/isup.h (original)
+++ trunk/isup.h Mon Mar 26 11:39:40 2007
@@ -132,6 +132,7 @@
 	int causeloc;
 	int cot_check_passed;
 	int cot_check_required;
+	int cicgroupsupervisiontype;
 	unsigned char event_info;
 	unsigned short cic;
 	unsigned short slc;

Modified: trunk/libss7.h
URL: http://svn.digium.com/view/libss7/trunk/libss7.h?view=diff&rev=75&r1=74&r2=75
==============================================================================
--- trunk/libss7.h (original)
+++ trunk/libss7.h Mon Mar 26 11:39:40 2007
@@ -116,6 +116,7 @@
 	int e;
 	int startcic;
 	int endcic;
+	int type;
 	unsigned char status[255];
 } ss7_event_cicrange;
 
@@ -222,13 +223,13 @@
 
 int isup_grs(struct ss7 *ss7, int begincic, int endcic);
 
-int isup_cgb(struct ss7 *ss7, int begincic, int endcic, unsigned char state[]);
-
-int isup_cgu(struct ss7 *ss7, int begincic, int endcic, unsigned char state[]);
-
-int isup_cgba(struct ss7 *ss7, int begincic, int endcic, unsigned char state[]);
-
-int isup_cgua(struct ss7 *ss7, int begincic, int endcic, unsigned char state[]);
+int isup_cgb(struct ss7 *ss7, int begincic, int endcic, unsigned char state[], int type);
+
+int isup_cgu(struct ss7 *ss7, int begincic, int endcic, unsigned char state[], int type);
+
+int isup_cgba(struct ss7 *ss7, int begincic, int endcic, unsigned char state[], int type);
+
+int isup_cgua(struct ss7 *ss7, int begincic, int endcic, unsigned char state[], int type);
 
 int isup_blo(struct ss7 *ss7, int cic);
 



More information about the svn-commits mailing list