[Asterisk-cvs] libpri-matt pri_facility.c,1.19,1.20

mattf at lists.digium.com mattf at lists.digium.com
Thu Feb 3 17:58:16 CST 2005


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

Modified Files:
	pri_facility.c 
Log Message:
Return result debugging and decoding


Index: pri_facility.c
===================================================================
RCS file: /usr/cvsroot/libpri-matt/pri_facility.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- pri_facility.c	3 Feb 2005 02:29:14 -0000	1.19
+++ pri_facility.c	3 Feb 2005 23:59:20 -0000	1.20
@@ -221,7 +221,21 @@
 
 static int rose_return_result_decode(q931_call *call, unsigned char *data, int len)
 {
-	pri_message("-- Got return result!\n");
+	unsigned char invokeid = 0, i = 0;
+	struct rose_component *comp = NULL;
+	unsigned char *vdata = data;
+	do {
+		GET_COMPONENT(comp, i , vdata, len);
+		CHECK_COMPONENT(comp, ASN1_INTEGER, "No Interpretation component found, instead 0x%x\n");
+		invokeid = comp->data[0];
+		pri_message("-- Got return result on invoke %d!\n", invokeid);
+		pri_message("-- Contents:\n   ");
+
+		for (;i < len; i++)
+			pri_message("0x%x ");
+		pri_message("\n");
+	} while (0);
+
 	return 0;
 }
 




More information about the svn-commits mailing list