[Asterisk-cvs] libpri-matt pri.c, 1.4, 1.5 pri_facility.c, 1.12,
1.13 q931.c, 1.13, 1.14
mattf at lists.digium.com
mattf at lists.digium.com
Thu Jan 13 14:45:09 CST 2005
Update of /usr/cvsroot/libpri-matt
In directory mongoose.digium.com:/tmp/cvs-serv21971
Modified Files:
pri.c pri_facility.c q931.c
Log Message:
More changes. Bugs, Uck! You spend 90% of your time finding 10% of the bugs
Index: pri.c
===================================================================
RCS file: /usr/cvsroot/libpri-matt/pri.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pri.c 13 Jan 2005 01:58:05 -0000 1.4
+++ pri.c 13 Jan 2005 20:49:04 -0000 1.5
@@ -491,8 +491,10 @@
c->mwi_state = MWI_STATE_ACT_SEND;
- mwi_activate_encode_and_queue(c, &req);
-
+ if (mwi_activate_encode_and_queue(c, &req) < 0) {
+ pri_message("Could not send mwi message\n");
+ return -1;
+ }
/* Do more stuff when we figure out that the CISC stuff works */
return q931_setup(pri, c, &req);
}
Index: pri_facility.c
===================================================================
RCS file: /usr/cvsroot/libpri-matt/pri_facility.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- pri_facility.c 13 Jan 2005 19:48:15 -0000 1.12
+++ pri_facility.c 13 Jan 2005 20:49:04 -0000 1.13
@@ -52,30 +52,27 @@
{
int res = 0, i = 0;
unsigned char * buffer = NULL;
- int destlen = strlen(call->callednum);
+ int destlen = strlen(req->called);
int istr = 0;
/* TODO:1 */
buffer = malloc(255);
if (!buffer)
return -1;
-
+
if (destlen <= 0) {
free(buffer);
return -1;
} 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], call->callednum, destlen);
+ strncpy(&buffer[i], req->called, destlen);
for (istr = 0; istr < destlen; istr++)
buffer[i+istr] |= 0x30; /* Have to or each digit with 0x30 to encode correctly */
@@ -85,7 +82,6 @@
buffer[i++] = 0x1; /* Length */
buffer[i++] = 0x1; /* contents: Voice */
- pri_message("!!!!!!!!!!!!!!!! length of buffer is %d\n", i);
res = pri_call_adpu_queue(call, Q931_SETUP, buffer, i, mwi_activate_encode_cb, buffer);
Index: q931.c
===================================================================
RCS file: /usr/cvsroot/libpri-matt/q931.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- q931.c 13 Jan 2005 01:58:05 -0000 1.13
+++ q931.c 13 Jan 2005 20:49:04 -0000 1.14
@@ -2118,12 +2118,10 @@
x=0;
codeset = 0;
while(ies[x] > -1) {
- if (x == Q931_IE_FACILITY) {
- pri_message("!!!!!!!!!!!!!!!!!!!!!!!!! send_message:Found facilityIE\n");
+ if (ies[x] == Q931_IE_FACILITY) {
res = 0;
while (facevent) {
if (!facevent->sent && (facevent->message == msgtype)) {
- pri_message("!!!!!!!!!!!!!!!!!!!!!!! Going to send\n");
int tmpres;
tmpres = add_ie(pri, c, mh->msg, ies[x], (q931_ie *)(mh->data + offset), len, &codeset);
if (tmpres < 0) {
More information about the svn-commits
mailing list