From ab1580de6704f8e71ef235bbce43ac03c75851a3 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Fri, 9 Oct 2009 23:20:37 +0000 Subject: [PATCH] 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. git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1169 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- q931.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/q931.c b/q931.c index 3ef7dd0..0ef7ed9 100644 --- a/q931.c +++ b/q931.c @@ -2307,16 +2307,22 @@ static void dump_ie_data(struct pri *ctrl, unsigned char *c, int len) 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)