[Asterisk-cvs] asterisk-addons/asterisk-ooh323c/ooh323c/src ooGkClient.c, 1.3, 1.4 oochannels.c, 1.7, 1.8 ooh323.c, 1.4, 1.5 ooq931.c, 1.9, 1.10

vphirke at lists.digium.com vphirke at lists.digium.com
Thu Jul 21 17:42:26 CDT 2005


Update of /usr/cvsroot/asterisk-addons/asterisk-ooh323c/ooh323c/src
In directory mongoose.digium.com:/tmp/cvs-serv32687/ooh323c/src

Modified Files:
	ooGkClient.c oochannels.c ooh323.c ooq931.c 
Log Message:
Updated stack src

Index: ooGkClient.c
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/asterisk-ooh323c/ooh323c/src/ooGkClient.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ooGkClient.c	24 Jun 2005 21:01:49 -0000	1.3
+++ ooGkClient.c	21 Jul 2005 21:49:36 -0000	1.4
@@ -1471,7 +1471,7 @@
    /* Populate call signalling addresses */
    pIpAddressLocal = (H225TransportAddress_ipAddress*)memAlloc(pctxt, 
                                      sizeof(H225TransportAddress_ipAddress));
-   if(strlen(call->remoteIP))
+   if(ooUtilsIsStrEmpty(call->remoteIP))
       pIpAddressRemote = (H225TransportAddress_ipAddress*)memAlloc(pctxt, 
                                       sizeof(H225TransportAddress_ipAddress));
 

Index: oochannels.c
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/asterisk-ooh323c/ooh323c/src/oochannels.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- oochannels.c	6 Jul 2005 12:49:54 -0000	1.7
+++ oochannels.c	21 Jul 2005 21:49:36 -0000	1.8
@@ -217,7 +217,7 @@
    {
       dListFreeAll(call->pctxt, &call->pH225Channel->outQueue);
       dListAppend (call->pctxt, &call->pH225Channel->outQueue, encodebuf);
-      ooSendMsg(call, OOQ931MSG);
+      // ooSendMsg(call, OOQ931MSG);
    }else{
 
       dListAppend (call->pctxt, &call->pH225Channel->outQueue, encodebuf);

Index: ooh323.c
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/asterisk-ooh323c/ooh323c/src/ooh323.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ooh323.c	16 Jun 2005 19:41:23 -0000	1.4
+++ ooh323.c	21 Jul 2005 21:49:36 -0000	1.5
@@ -1604,7 +1604,7 @@
                memFreePtr(pctxt, pAliasEntry);
                return OO_FAILED;
             }
-            for(i=0; i<(int)strlen(pAlias->value); i++)
+            for(i=0; *(pAlias->value+i) != '\0'; i++)
                pAliasEntry->u.h323_ID.data[i] =(ASN116BITCHAR)pAlias->value[i];
             bValid = TRUE;
             break;

Index: ooq931.c
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/asterisk-ooh323c/ooh323c/src/ooq931.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- ooq931.c	19 Jul 2005 13:29:23 -0000	1.9
+++ ooq931.c	21 Jul 2005 21:49:36 -0000	1.10
@@ -42,7 +42,7 @@
 EXTERN int ooQ931Decode 
    (OOH323CallData *call, Q931Message* msg, int length, ASN1OCTET *data) 
 {
-   int offset;
+   int offset, x;
    int rv = ASN_OK;
    char number[128];
    OOCTXT *pctxt = &gH323ep.msgctxt;
@@ -62,9 +62,16 @@
    OOTRACEDBGB2("   callReference = %d\n", msg->callReference);
 
    msg->fromDestination = (data[2] & 0x80) != 0;
+   if(msg->fromDestination)
+      OOTRACEDBGB1("   from = destination\n");
+   else
+      OOTRACEDBGB1("   from = originator\n");   
+
 
    msg->messageType = data[4];
+   OOTRACEDBGB2("   messageType = %x\n", msg->messageType);
 
+   
    /* Have preamble, start getting the informationElements into buffers */
    offset = 5;
    while (offset < length) {
@@ -134,7 +141,24 @@
          ie->offset = offset;
          ie->length = 0;
       }
-      
+      if(ie->discriminator == Q931BearerCapabilityIE)
+      {
+         OOTRACEDBGB1("   Bearer-Capability IE = {\n");
+         for(x=0; x<ie->length; x++)
+         {
+            if(x==0)
+               OOTRACEDBGB2("      %x", ie->data[x]);
+            else
+               OOTRACEDBGB2(", %x", ie->data[x]);
+         }
+         OOTRACEDBGB1("   }\n");
+      }
+      if(ie->discriminator == Q931DisplayIE)
+      {
+         OOTRACEDBGB1("   Display IE = {\n");
+         OOTRACEDBGB2("      %s\n", ie->data);
+         OOTRACEDBGB1("   }\n");
+      }
       /* Extract calling party number TODO:Give respect to presentation and 
          screening indicators ;-) */
       if(ie->discriminator == Q931CallingPartyNumberIE)
@@ -575,7 +599,7 @@
 }
 
 #ifndef _COMPACT
-static void ooPrintQ931Message 
+static void ooQ931PrintMessage 
    (OOH323CallData* call, ASN1OCTET *msgbuf, ASN1UINT msglen)
 {
 
@@ -694,7 +718,7 @@
    } 
       
    /*Add display ie. */
-   if(strlen(call->ourCallerId)>0)
+   if(ooUtilsIsStrEmpty(call->ourCallerId))
    {
       msgbuf[i++] = Q931DisplayIE;
       ieLen = strlen(call->ourCallerId)+1;
@@ -772,9 +796,9 @@
   
 #ifndef _COMPACT
    if(msgbuf[0] != OOFacility)
-      ooPrintQ931Message (call, msgbuf+5, len-4);
+      ooQ931PrintMessage (call, msgbuf+5, len-4);
    else
-      ooPrintQ931Message (call, msgbuf+8, len-4);
+      ooQ931PrintMessage (call, msgbuf+8, len-4);
 #endif
    return OO_OK;
 }
@@ -2225,7 +2249,7 @@
    /* For H.323 version 4 and higher, if fast connect, tunneling should be 
       supported.
    */
-   if(OO_TESTFLAG(gH323ep.flags, OO_M_FASTSTART))
+   if(OO_TESTFLAG(call->flags, OO_M_FASTSTART))
       q931msg->userInfo->h323_uu_pdu.h245Tunneling = TRUE;
 
    OOTRACEDBGA3("Built SETUP message (%s, %s)\n", call->callType, 
@@ -2657,12 +2681,12 @@
    /* e-164 */
    /* strspn(dest, "1234567890*#") == strlen(dest)*/
    /* Dialed digits test*/
-   for(i=0; i<(int)strlen(alias); i++)
+   for(i=0; *(alias+i) != '\0'; i++)
    {
       if(!isdigit(alias[i]))
          break;
    }
-   if(i == (int)strlen(alias))
+   if(*(alias+i) == '\0')
    {
       psNewAlias = (ooAliases*) memAlloc(call->pctxt, sizeof(ooAliases));
       if(!psNewAlias)
@@ -3145,12 +3169,12 @@
    /* e-164 */
    /* strspn(dest, "1234567890*#") == strlen(dest)*/
    /* Dialed digits test*/
-   for(i=0; i<(int)strlen(alias); i++)
+   for(i=0; *(alias+i) != '\0'; i++)
    {
       if(!isdigit(alias[i]))
          break;
    }
-   if(i == (int)strlen(alias))
+   if(*(alias+i) == '\0')
    {
       psNewAlias = (ooAliases*) memAlloc(pctxt, sizeof(ooAliases));
       if(!psNewAlias)




More information about the svn-commits mailing list