[libpri-commits] moy: branch moy/tap-1.4 r1141 - /team/moy/tap-1.4/pridump.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Sat Sep 26 20:05:51 CDT 2009


Author: moy
Date: Sat Sep 26 20:05:47 2009
New Revision: 1141

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1141
Log:
put back some code in pridump.c

Modified:
    team/moy/tap-1.4/pridump.c

Modified: team/moy/tap-1.4/pridump.c
URL: http://svnview.digium.com/svn/libpri/team/moy/tap-1.4/pridump.c?view=diff&rev=1141&r1=1140&r2=1141
==============================================================================
--- team/moy/tap-1.4/pridump.c (original)
+++ team/moy/tap-1.4/pridump.c Sat Sep 26 20:05:47 2009
@@ -70,33 +70,13 @@
 
 static void dump_packet(struct pri *pri, char *buf, int len, int txrx)
 {
-	//q921_h *h = (q921_h *)buf;
+	q921_h *h = (q921_h *)buf;
 
-	//q921_dump(pri, h, len, 1, txrx);
+	q921_dump(pri, h, len, 1, txrx);
 	
-	// Check if data is long enough and if this is a Q931 frame
-	if ((len < 5) || ((int)buf[4] != 8)) {
-		return;
-	}
-	q931_dump(pri, (void*)(buf + 4), len - 4 - 2, txrx);
-
-#if 0
-	switch (h->h.data[0] & Q921_FRAMETYPE_MASK) {
-	case 0:
-	case 2:
-		q931_dump(pri, (q931_h *)(h->i.data), len - 4 - 2 /* FCS */, txrx);
-		break;
-	default:
-		break;
-	}
-
-	// serch for 0 in the first 2 bits (which __q921_receive_qualified handles just as 2, frame 3 can also have q931 msg though)
 	if (!((h->h.data[0] & Q921_FRAMETYPE_MASK) & 0x3)) {
-		// case 3 h->h.data[0] & Q921_FRAMETYPE_MASK, res = q931_receive(pri, (q931_h *) h->u.data, len - 3);
 		q931_dump(pri, (q931_h *)(h->i.data), len - 4 - 2 /* FCS */, txrx);
 	}
-#endif
-
 	fflush(stdout);
 	fflush(stderr);
 }




More information about the libpri-commits mailing list