[Asterisk-cvs] libpri-matt pri_facility.c,1.11,1.12

mattf at lists.digium.com mattf at lists.digium.com
Thu Jan 13 13:44:20 CST 2005


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

Modified Files:
	pri_facility.c 
Log Message:
Forgot to 'OR' the string on encode


Index: pri_facility.c
===================================================================
RCS file: /usr/cvsroot/libpri-matt/pri_facility.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- pri_facility.c	13 Jan 2005 01:58:05 -0000	1.11
+++ pri_facility.c	13 Jan 2005 19:48:15 -0000	1.12
@@ -52,7 +52,8 @@
 {
 	int res = 0, i = 0;
 	unsigned char * buffer = NULL;
-	int destlen = strlen(req->called);
+	int destlen = strlen(call->callednum);
+	int istr = 0;
 	/* TODO:1 */
 
 	buffer = malloc(255);
@@ -65,12 +66,20 @@
 	} else if (destlen > 20)
 		destlen = 20;  /* Destination number cannot be greater then 20 digits */
 
+		
+
+
 	buffer[i++] = 0x30; /* Sequence */
 	buffer[i++] = 5 /* All fixed length necessary parts */
 		+ destlen;
 	buffer[i++] = 0x80; /* PartyNumber */
 	buffer[i++] = destlen;
-	strncpy(&buffer[i], req->called, destlen);
+
+	strncpy(&buffer[i], call->callednum, destlen);
+
+	for (istr = 0; istr < destlen; istr++)
+		buffer[i+istr] |= 0x30; /* Have to or each digit with 0x30 to encode correctly */
+
 	i += destlen;
 	buffer[i++] = 0xa; /* Enumeration: basicService */
 	buffer[i++] = 0x1; /* Length */
@@ -343,6 +352,9 @@
 				case COMP_TYPE_NFE:
 					if (pri->debug) pri_message("Handle NFE component\n");
 					break;
+				case COMP_TYPE_REJECT:
+					if (pri->debug) pri_message("Got reject\n");
+					break;
 				default:
 					if (pri->debug) pri_message("Don't know how to handle ROSE component of type 0x%X\n", comp->type);
 					break;




More information about the svn-commits mailing list