[libpri-commits] rmudgett: branch 1.4 r1169 - /branches/1.4/q931.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Fri Oct 9 18:20:41 CDT 2009


Author: rmudgett
Date: Fri Oct  9 18:20:37 2009
New Revision: 1169

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1169
Log:
Conditional out noisy and redundant ASN.1 parse dump of facility ie contents.

1) Outgoing messages have the facility ie ASN.1 decoded and dumped when the
ie is added to the message.  The whole message is then dumped.
2) Incoming messages have the facility ie ASN.1 decoded and dumped when the
ie is processed.  The whole message has already been dumped.

Modified:
    branches/1.4/q931.c

Modified: branches/1.4/q931.c
URL: http://svnview.digium.com/svn/libpri/branches/1.4/q931.c?view=diff&rev=1169&r1=1168&r2=1169
==============================================================================
--- branches/1.4/q931.c (original)
+++ branches/1.4/q931.c Fri Oct  9 18:20:37 2009
@@ -2307,16 +2307,22 @@
 
 static void dump_facility(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix)
 {
-	int dataat = (ie->data[0] & 0x80) ? 1 : 2;
-
 	pri_message(ctrl, "%c Facility (len=%2d, codeset=%d) [ ", prefix, len, Q931_IE_CODESET(full_ie));
 	dump_ie_data(ctrl, ie->data, ie->len);
-	pri_message(NULL, " ]\n");
+	pri_message(ctrl, " ]\n");
+#if 0	/* Lets not dump parse of facility contents here anymore. */
+	/*
+	 * The ASN.1 decode dump has already been done when the facility ie was added to the outgoing
+	 * message or the ASN.1 decode dump will be done when the facility ie is processed on incoming
+	 * messages.  This dump is redundant and very noisy.
+	 */
 	if (ie->len > 1) {
+		int dataat = (ie->data[0] & 0x80) ? 1 : 2;
+
 		pri_message(ctrl, "PROTOCOL %02X\n", ie->data[0] & Q932_PROTOCOL_MASK);
 		asn1_dump(ctrl, ie->data + dataat, ie->data + ie->len);
 	}
-
+#endif	/* Lets not dump parse of facility contents here anymore. */
 }
 
 static void dump_network_spec_fac(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix)




More information about the libpri-commits mailing list