[asterisk-addons-commits] trunk r205 - /trunk/asterisk-ooh323c/ooh323c/src/

asterisk-addons-commits at lists.digium.com asterisk-addons-commits at lists.digium.com
Tue Apr 11 07:03:52 MST 2006


Author: objsys
Date: Tue Apr 11 09:03:51 2006
New Revision: 205

URL: http://svn.digium.com/view/asterisk-addons?rev=205&view=rev
Log:
Fixed bug causing core dump for manaul ringback in cleared call

Modified:
    trunk/asterisk-ooh323c/ooh323c/src/ooCapability.c
    trunk/asterisk-ooh323c/ooh323c/src/ooCmdChannel.c
    trunk/asterisk-ooh323c/ooh323c/src/oochannels.c
    trunk/asterisk-ooh323c/ooh323c/src/ooh323.c

Modified: trunk/asterisk-ooh323c/ooh323c/src/ooCapability.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/ooh323c/src/ooCapability.c?rev=205&r1=204&r2=205&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/ooh323c/src/ooCapability.c (original)
+++ trunk/asterisk-ooh323c/ooh323c/src/ooCapability.c Tue Apr 11 09:03:51 2006
@@ -921,12 +921,6 @@
    /* Can we receive this capability */
    if(dir & OORX)
    {
-      //if(cap == OO_G7231) {
-      //   if(((OOCapParams*)epCap->params)->rxframes <= noofframes) {
-      //      return TRUE;
-      //   }
-      //}
-      //else
       if(((OOCapParams*)epCap->params)->rxframes >= noofframes) {
          return TRUE;
       }
@@ -935,12 +929,6 @@
    /* Can we transmit compatible stream */
    if(dir & OOTX)
    {
-      //if(cap == OO_G7231) {
-      //   if(((OOCapParams*)epCap->params)->txframes >= noofframes) {
-      //      return TRUE;
-      //   }
-      //}
-      //else 
       if(((OOCapParams*)epCap->params)->txframes <= noofframes) {
          return TRUE;
       }

Modified: trunk/asterisk-ooh323c/ooh323c/src/ooCmdChannel.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/ooh323c/src/ooCmdChannel.c?rev=205&r1=204&r2=205&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/ooh323c/src/ooCmdChannel.c (original)
+++ trunk/asterisk-ooh323c/ooh323c/src/ooCmdChannel.c Tue Apr 11 09:03:51 2006
@@ -130,7 +130,7 @@
 
 int ooReadAndProcessStackCommand()
 {
-   OOH323CallData *call = NULL;   
+   OOH323CallData *pCall = NULL;   
    unsigned char buffer[MAXMSGLEN];
    int i, recvLen = 0;
    OOStackCommand cmd;
@@ -167,16 +167,33 @@
             case OO_CMD_MANUALRINGBACK:
                if(OO_TESTFLAG(gH323ep.flags, OO_M_MANUALRINGBACK))
                {
-                  ooSendAlerting(ooFindCallByToken((char*)cmd.param1));
-                  if(OO_TESTFLAG(gH323ep.flags, OO_M_AUTOANSWER))
-                     ooSendConnect(ooFindCallByToken((char*)cmd.param1));
+                  pCall = ooFindCallByToken((char*)cmd.param1);
+                  if(!pCall) {
+                     OOTRACEINFO2("Call \"%s\" does not exist\n",
+                                  (char*)cmd.param1);
+                     OOTRACEINFO1("Call migth be cleared/closed\n");
+                  }
+                  else {
+                     ooSendAlerting(ooFindCallByToken((char*)cmd.param1));
+                     if(OO_TESTFLAG(gH323ep.flags, OO_M_AUTOANSWER)) {
+                        ooSendConnect(ooFindCallByToken((char*)cmd.param1));
+                     }
+                  }
                }
                break;
  
             case OO_CMD_ANSCALL:
-               OOTRACEINFO2("Processing Answer Call command for %s\n",
-                            (char*)cmd.param1);
-               ooSendConnect(ooFindCallByToken((char*)cmd.param1));
+               pCall = ooFindCallByToken((char*)cmd.param1);
+               if(!pCall) {
+                  OOTRACEINFO2("Call \"%s\" does not exist\n",
+                               (char*)cmd.param1);
+                  OOTRACEINFO1("Call might be cleared/closed\n");
+               }
+               else {
+                  OOTRACEINFO2("Processing Answer Call command for %s\n",
+                               (char*)cmd.param1);
+                  ooSendConnect(pCall);
+               }
                break;
 
             case OO_CMD_FWDCALL:
@@ -187,27 +204,29 @@
 
             case OO_CMD_HANGCALL: 
                OOTRACEINFO2("Processing Hang call command %s\n", 
-                                   (char*)cmd.param1);
+                             (char*)cmd.param1);
                ooH323HangCall((char*)cmd.param1, 
-                                          *(OOCallClearReason*)cmd.param2);
+                              *(OOCallClearReason*)cmd.param2);
                break;
           
             case OO_CMD_SENDDIGIT:
-               call = ooFindCallByToken((char*)cmd.param1);
-               if(!call)
-               {
-                  OOTRACEERR2("Error:Invalid calltoken %s\n", 
-                                                         (char*)cmd.param1);
+               pCall = ooFindCallByToken((char*)cmd.param1);
+               if(!pCall) {
+                  OOTRACEERR2("ERROR:Invalid calltoken %s\n",
+                              (char*)cmd.param1);
                   break;
                }
-               if(call->jointDtmfMode & OO_CAP_DTMF_H245_alphanumeric)
-                  ooSendH245UserInputIndication_alphanumeric(call, 
-                                                      (const char*)cmd.param2);
-               else if(call->jointDtmfMode & OO_CAP_DTMF_H245_signal)
-                  ooSendH245UserInputIndication_signal(call, 
-                                                  (const char*)cmd.param2);
-               else
-                  ooQ931SendDTMFAsKeyPadIE(call, (const char*)cmd.param2);
+               if(pCall->jointDtmfMode & OO_CAP_DTMF_H245_alphanumeric) {
+                  ooSendH245UserInputIndication_alphanumeric(
+                     pCall, (const char*)cmd.param2);
+               }
+               else if(pCall->jointDtmfMode & OO_CAP_DTMF_H245_signal) {
+                  ooSendH245UserInputIndication_signal(
+                     pCall, (const char*)cmd.param2);
+               }
+               else {
+                  ooQ931SendDTMFAsKeyPadIE(pCall, (const char*)cmd.param2);
+               }
 
                break;
 

Modified: trunk/asterisk-ooh323c/ooh323c/src/oochannels.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/ooh323c/src/oochannels.c?rev=205&r1=204&r2=205&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/ooh323c/src/oochannels.c (original)
+++ trunk/asterisk-ooh323c/ooh323c/src/oochannels.c Tue Apr 11 09:03:51 2006
@@ -562,7 +562,7 @@
    if(gH323ep.gkClient)
    {   
       ooTimerFireExpired(&gH323ep.gkClient->ctxt, 
-                                        &gH323ep.gkClient->timerList);
+                         &gH323ep.gkClient->timerList);
       if(ooTimerNextTimeout(&gH323ep.gkClient->timerList, &toNext))
       {
          if(ooCompareTimeouts(pToMin, &toNext)>0)
@@ -594,11 +594,9 @@
       }
    }
 
-   if(gH323ep.cmdSock)
-   {
-      if(FD_ISSET(gH323ep.cmdSock, pReadfds))
-      {
-        ooReadAndProcessStackCommand();
+   if(gH323ep.cmdSock) {
+      if(FD_ISSET(gH323ep.cmdSock, pReadfds)) {
+         ooReadAndProcessStackCommand();
       }
    }
 
@@ -920,6 +918,7 @@
 
    initializePrintHandler(&printHandler, "Received H.2250 Message");
    setEventHandler (pctxt, &printHandler);
+
    ret = ooQ931Decode (call, pmsg, len, message);
    if(ret != OO_OK) {
       OOTRACEERR3("Error:Failed to decode received H.2250 message. (%s, %s)\n",

Modified: trunk/asterisk-ooh323c/ooh323c/src/ooh323.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/ooh323c/src/ooh323.c?rev=205&r1=204&r2=205&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/ooh323c/src/ooh323.c (original)
+++ trunk/asterisk-ooh323c/ooh323c/src/ooh323.c Tue Apr 11 09:03:51 2006
@@ -1076,7 +1076,9 @@
             ret = ooH323CallAdmitted (call);
          }
          break;
-      case Q931CallProceedingMsg: /* Call proceeding message is received */
+
+
+      case Q931CallProceedingMsg: /* CALL PROCEEDING message is received */
          OOTRACEINFO3("H.225 Call Proceeding message received (%s, %s)\n",
                       call->callType, call->callToken);
          ooOnReceivedCallProceeding(call, q931Msg);



More information about the asterisk-addons-commits mailing list