[asterisk-commits] may: branch may/ooh323_ipv6_direct_rtp r349724 - /team/may/ooh323_ipv6_direct...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 5 14:55:56 CST 2012


Author: may
Date: Thu Jan  5 14:55:53 2012
New Revision: 349724

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=349724
Log:
fix coding issues again

Modified:
    team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.c
    team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh323.c
    team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c

Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.c?view=diff&rev=349724&r1=349723&r2=349724
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.c Thu Jan  5 14:55:53 2012
@@ -2563,15 +2563,15 @@
    /* Send Close Logical Channel if LogChan is established */
    if (lChannel->state == OO_LOGICALCHAN_ESTABLISHED) {
      ret = ooSendCloseLogicalChannel(call, lChannel);
-     if(ret != OO_OK)
-     {
+     if (ret != OO_OK) {
       OOTRACEERR3("ERROR:Failed to build CloseLgicalChannel message(%s, %s)\n",
                    call->callType, call->callToken);
       return OO_FAILED;
      }
    }
-   if(error) return OO_FAILED;
-
+   if (error) {
+	return OO_FAILED;
+   }
    return ret;
 }
 
@@ -2834,8 +2834,7 @@
                 clcAck->forwardLogicalChannelNumber, call->callType, 
                 call->callToken);
    ret = ooClearLogicalChannel(call, clcAck->forwardLogicalChannelNumber);
-   if(ret != OO_OK)
-   {
+   if (ret != OO_OK) {
       OOTRACEERR4("ERROR:Failed to close logical channel %d (%s, %s)\n",
          clcAck->forwardLogicalChannelNumber, call->callType, call->callToken);
       return OO_FAILED;

Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh323.c?view=diff&rev=349724&r1=349723&r2=349724
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh323.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh323.c Thu Jan  5 14:55:53 2012
@@ -1417,9 +1417,6 @@
       {
          OOTRACEINFO3("Remote endpoint has rejected fastStart. (%s, %s)\n",
                       call->callType, call->callToken);
-         /* Clear all channels we might have created */
-	 /* don't need this */
-         /* ooClearAllLogicalChannels(call); */
          OO_CLRFLAG (call->flags, OO_M_FASTSTART);
       }
    }

Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c?view=diff&rev=349724&r1=349723&r2=349724
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c Thu Jan  5 14:55:53 2012
@@ -875,7 +875,7 @@
 
 int ooHandleFastStartChannels(OOH323CallData *pCall)
 {
-   int i=0, j=0, remoteMediaControlPort = 0, dir=0;
+   int i = 0, j = 0, remoteMediaControlPort = 0, dir = 0;
    char remoteMediaControlIP[2+8*4+7];
    DListNode *pNode = NULL;
    H245OpenLogicalChannel *olc = NULL;
@@ -884,26 +884,25 @@
 
 
    /* If fast start supported and remote endpoint has sent faststart element */
-   if(OO_TESTFLAG(pCall->flags, OO_M_FASTSTART) && 
-      pCall->remoteFastStartOLCs.count>0)
-   {
+   if (OO_TESTFLAG(pCall->flags, OO_M_FASTSTART) && 
+      pCall->remoteFastStartOLCs.count>0) {
+
       /* Go though all the proposed channels */
-      for(i=0, j=0; i<(int)pCall->remoteFastStartOLCs.count; i++)
-      {
+
+      for (i = 0, j = 0; i < (int)pCall->remoteFastStartOLCs.count; i++) {
 
          pNode = dListFindByIndex(&pCall->remoteFastStartOLCs, i);
          olc = (H245OpenLogicalChannel*)pNode->data;
 
          /* Don't support both direction channel */
-         if(olc->forwardLogicalChannelParameters.dataType.t != 
+         if (olc->forwardLogicalChannelParameters.dataType.t != 
                                                    T_H245DataType_nullData &&
             olc->m.reverseLogicalChannelParametersPresent)
             continue;
 
          /* Check forward logic channel */
-         if(olc->forwardLogicalChannelParameters.dataType.t != 
-                                                   T_H245DataType_nullData)
-         {
+         if (olc->forwardLogicalChannelParameters.dataType.t != 
+                                                   T_H245DataType_nullData) {
             /* Forward Channel - remote transmits - local receives */
             OOTRACEDBGC4("Processing received forward olc %d (%s, %s)\n", 
                           olc->forwardLogicalChannelNumber, pCall->callType, 
@@ -913,12 +912,13 @@
                                 &olc->forwardLogicalChannelParameters.dataType,
                                 OORX);
             
-            if(!epCap) { continue; } /* Not Supported Channel */
+            if (!epCap) {
+		continue; /* Not Supported Channel */
+	    }
 
             OOTRACEINFO1("Receive Channel data type supported\n");
-            if(olc->forwardLogicalChannelParameters.multiplexParameters.t !=
-               T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
-            {
+            if (olc->forwardLogicalChannelParameters.multiplexParameters.t !=
+               T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters) {
                OOTRACEERR4("ERROR:Unknown multiplex parameter type for "
                            "channel %d (%s, %s)\n", 
                            olc->forwardLogicalChannelNumber, 
@@ -930,8 +930,7 @@
             h2250lcp = olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters;
 
             /* Check session is Not already established */
-            if(ooIsSessionEstablished(pCall, olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters->sessionID, "receive"))
-            {
+            if (ooIsSessionEstablished(pCall, olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters->sessionID, "receive")) {
 
                OOTRACEINFO4("Receive channel with sessionID %d already "
                             "established.(%s, %s)\n", olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters->sessionID, 
@@ -942,12 +941,10 @@
             }
 
             /* Extract mediaControlChannel info, if supplied */
-            if(h2250lcp->m.mediaControlChannelPresent)
-            {
-               if(OO_OK != ooGetIpPortFromH245TransportAddress(pCall, 
+            if (h2250lcp->m.mediaControlChannelPresent) {
+               if (OO_OK != ooGetIpPortFromH245TransportAddress(pCall, 
                                 &h2250lcp->mediaControlChannel, 
-                                remoteMediaControlIP, &remoteMediaControlPort))
-               {
+                                remoteMediaControlIP, &remoteMediaControlPort)) {
                   OOTRACEERR3("Error: Invalid media control channel address "
                               "(%s, %s)\n", pCall->callType, pCall->callToken);
                   memFreePtr(pCall->pctxt, epCap);
@@ -962,11 +959,13 @@
            continue;
          }
 
-         if(dir & OORX) {
+         if (dir & OORX) {
             remoteMediaControlPort--;
-	    if(gH323ep.h323Callbacks.onMediaChanged && pCall->callState<OO_CALL_CLEAR)
+	    if (gH323ep.h323Callbacks.onMediaChanged &&
+		pCall->callState < OO_CALL_CLEAR) {
             	gH323ep.h323Callbacks.onMediaChanged(pCall, remoteMediaControlIP, 
 								remoteMediaControlPort);
+	    }
          }
 
 
@@ -975,7 +974,6 @@
    }
    return ASN_OK;
 }
-
 
 
 int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg, 
@@ -1765,7 +1763,7 @@
    OOTRACEDBGA3("Building FS update message (%s, %s)\n", call->callType,
                  call->callToken);
    ret = ooCreateQ931Message(pctxt, &pQ931Msg, Q931FacilityMsg);
-   if(ret != OO_OK) {
+   if (ret != OO_OK) {
       OOTRACEERR3("ERROR: In allocating memory for facility message (%s, %s)\n",
           call->callType, call->callToken);
       return OO_FAILED;




More information about the asterisk-commits mailing list