[svn-commits] mattf: branch 1.2 r415 - /branches/1.2/pri_facility.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Jun 6 06:20:05 MST 2007


Author: mattf
Date: Wed Jun  6 08:20:05 2007
New Revision: 415

URL: http://svn.digium.com/view/libpri?view=rev&rev=415
Log:
Make sure we only send the NFE when we are talking QSIG

Modified:
    branches/1.2/pri_facility.c

Modified: branches/1.2/pri_facility.c
URL: http://svn.digium.com/view/libpri/branches/1.2/pri_facility.c?view=diff&rev=415&r1=414&r2=415
==============================================================================
--- branches/1.2/pri_facility.c (original)
+++ branches/1.2/pri_facility.c Wed Jun  6 08:20:05 2007
@@ -721,11 +721,13 @@
 	buffer[i++] = (ASN1_CONTEXT_SPECIFIC | Q932_PROTOCOL_EXTENSIONS);
 	/* Interpretation component */
 
-	ASN1_ADD_SIMPLE(comp, COMP_TYPE_NFE, buffer, i);
-	ASN1_PUSH(compstk, compsp, comp);
-	ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_0), buffer, i, 0);
-	ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_2), buffer, i, 0);
-	ASN1_FIXUP(compstk, compsp, buffer, i);
+	if (pri->switchtype == PRI_SWITCH_QSIG) {
+		ASN1_ADD_SIMPLE(comp, COMP_TYPE_NFE, buffer, i);
+		ASN1_PUSH(compstk, compsp, comp);
+		ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_0), buffer, i, 0);
+		ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_2), buffer, i, 0);
+		ASN1_FIXUP(compstk, compsp, buffer, i);
+	}
 
 	ASN1_ADD_BYTECOMP(comp, COMP_TYPE_INTERPRETATION, buffer, i, 0);
 
@@ -762,11 +764,12 @@
 	buffer[i++] = (ASN1_CONTEXT_SPECIFIC | Q932_PROTOCOL_EXTENSIONS);
 	/* Interpretation component */
 
-	ASN1_ADD_SIMPLE(comp, COMP_TYPE_NFE, buffer, i);
-	ASN1_PUSH(compstk, compsp, comp);
-	ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_0), buffer, i, 0);
-	ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_2), buffer, i, 0);
-	ASN1_FIXUP(compstk, compsp, buffer, i);
+	if (pri->switchtype == PRI_SWITCH_QSIG) {
+		ASN1_ADD_SIMPLE(comp, COMP_TYPE_NFE, buffer, i); ASN1_PUSH(compstk, compsp, comp);
+		ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_0), buffer, i, 0);
+		ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_2), buffer, i, 0);
+		ASN1_FIXUP(compstk, compsp, buffer, i);
+	}
 
 	ASN1_ADD_BYTECOMP(comp, COMP_TYPE_INTERPRETATION, buffer, i, 0);
 



More information about the svn-commits mailing list