Minor debugging improvements (bug #2758)

git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@157 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Mark Spencer 2004-10-30 20:22:04 +00:00
parent b6d1f4016f
commit 52f8d6bbd9
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ static void dump_packet(char *buf, int len, int txrx)
q921_h *h = (q921_h *)buf;
q921_dump(h, len, 1, txrx);
if (!((h->h.data[0] & Q921_FRAMETYPE_MASK) & 0x3)) {
q931_dump((q931_h *)(h->i.data), len - 4, txrx);
q931_dump((q931_h *)(h->i.data), len - 4 - 2 /* FCS */, txrx);
}
fflush(stdout);
fflush(stderr);

2
q931.c
View File

@ -1782,7 +1782,7 @@ void q931_dump(q931_h *h, int len, int txrx)
int codeset;
c = txrx ? '>' : '<';
pri_message("%c Protocol Discriminator: %s (%d) len=%d\n", c, disc2str(h->pd), h->pd, len);
pri_message("%c Call Ref: len=%2d (reference %d/0x%X) (%s)\n", c, h->crlen, q931_cr(h), q931_cr(h), (h->crv[0] & 0x80) ? "Terminator" : "Originator");
pri_message("%c Call Ref: len=%2d (reference %d/0x%X) (%s)\n", c, h->crlen, q931_cr(h) & 0x7FFF, q931_cr(h) & 0x7FFF, (h->crv[0] & 0x80) ? "Terminator" : "Originator");
/* Message header begins at the end of the call reference number */
mh = (q931_mh *)(h->contents + h->crlen);
pri_message("%c Message type: %s (%d)\n", c, msg2str(mh->msg), mh->msg);