[Asterisk-cvs] libpri pridump.c,1.2,1.3 q931.c,1.94,1.95

markster at lists.digium.com markster at lists.digium.com
Sat Oct 30 16:19:16 CDT 2004


Update of /usr/cvsroot/libpri
In directory mongoose.digium.com:/tmp/cvs-serv30443

Modified Files:
	pridump.c q931.c 
Log Message:
Minor debugging improvements (bug #2758)


Index: pridump.c
===================================================================
RCS file: /usr/cvsroot/libpri/pridump.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pridump.c	22 May 2004 04:25:53 -0000	1.2
+++ pridump.c	30 Oct 2004 20:22:04 -0000	1.3
@@ -72,7 +72,7 @@
 	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);

Index: q931.c
===================================================================
RCS file: /usr/cvsroot/libpri/q931.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- q931.c	30 Oct 2004 20:19:18 -0000	1.94
+++ q931.c	30 Oct 2004 20:22:04 -0000	1.95
@@ -1782,7 +1782,7 @@
 	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);




More information about the svn-commits mailing list