[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-server-cvs
Subject:    [Server-cvs] qos/transport qos_tran_cc.cpp,1.91.8.8,1.91.8.9
From:       stiwary () helixcommunity ! org
Date:       2008-02-28 14:11:58
Message-ID: 200802281412.m1SEC5uX023763 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/server/qos/transport
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv4685

Modified Files:
      Tag: SERVER_12
	qos_tran_cc.cpp 
Log Message:
Approved By: Dean
Branches: Server_12_RN, Head

Synopsis
========
Fix for PR:212783:Default value of variable 'HonorMaxSendRate' is '0' and not '1'

Branch: HEAD , SERVER_12_RN.
Suggested Reviewer: Anyone

Description
===============

HonorMaxSendRate is read from config & if present & set to one then initialize \
m_bPassThrough = 0. This will not allow to pass maxsend rate. But if not present we \
were initializing m_bPassThrough to TRUE rather we should initialize it to FALSE. \
That too is also not required as in the constructor we are initializing it to FALSE. \
So, as fix I removed the else part of the code.

Files Affected
===============
server\qos\transport\qos_tran_cc.cpp

Testing Performed
===============

Functional Tests:
-----------------

Tested the playback with TCP & RateControl.Maxsendrate= 80000 with & without \
HonorMaxSendRate variable. The Send rate is as expected to be capped to 80kbps

Integration Tests:
-----------------

n/a

Leak Tests:
----------

n/a


Performance Tests:
-----------------

n/a


Platforms Tested: win32-i386-vc7

Build Verified: win32-i386-vc7


QA Hints
===============

--none

Regards,

Sandeep 

Index: qos_tran_cc.cpp
===================================================================
RCS file: /cvsroot/server/qos/transport/qos_tran_cc.cpp,v
retrieving revision 1.91.8.8
retrieving revision 1.91.8.9
diff -u -d -r1.91.8.8 -r1.91.8.9
--- qos_tran_cc.cpp	26 Feb 2008 15:21:33 -0000	1.91.8.8
+++ qos_tran_cc.cpp	28 Feb 2008 14:11:54 -0000	1.91.8.9
@@ -71,7 +71,7 @@
 #define QOS_CC_RTP_TCP_IP_OVERHEAD   48 /* bytes */
 #define QOS_CC_RDT_UDP_IP_OVERHEAD   36 /* bytes */
 #define QOS_CC_RDT_TCP_IP_OVERHEAD   48 /* bytes */
-#define QOS_RC_SLOWSEND_MAXLIMIT     1
+#define QOS_RC_SLOWSEND_MAXLIMIT     1
 #define QOS_RC_SLOWSEND_MINLIMIT     0
 
 #define QOS_DEBUG_OUTF(flag,args) ((flag) ? fprintf args : 0)
@@ -485,28 +485,28 @@
         }
     }
 
-    lTemp = 0;
-    if (SUCCEEDED(pConfig->GetConfigBuffer(QOS_CFG_RC_SLOWDOWN_RATE, pBuffer))
-                  && pBuffer && pBuffer->GetBuffer())
-    {
-        m_fSlowdownRate = atof((const char*)pBuffer->GetBuffer())/100.0;
-        HX_RELEASE(pBuffer);
-    }
-    else
-    {
-        if (SUCCEEDED(pConfig->GetConfigInt(QOS_CFG_RC_SLOWDOWN_RATE, lTemp)))
-        {
-            m_fSlowdownRate = (double)((double)lTemp/100.0);
-        }
-        else
-        {
-            m_fSlowdownRate = QOS_RC_DEFAULT_SLOWSEND_SCALAR;
-        }
-    }
-
-    if (m_fSlowdownRate < QOS_RC_SLOWSEND_MINLIMIT || m_fSlowdownRate > \
                QOS_RC_SLOWSEND_MAXLIMIT)
-    {
-        m_fSlowdownRate = QOS_RC_DEFAULT_SLOWSEND_SCALAR;
+    lTemp = 0;
+    if (SUCCEEDED(pConfig->GetConfigBuffer(QOS_CFG_RC_SLOWDOWN_RATE, pBuffer))
+                  && pBuffer && pBuffer->GetBuffer())
+    {
+        m_fSlowdownRate = atof((const char*)pBuffer->GetBuffer())/100.0;
+        HX_RELEASE(pBuffer);
+    }
+    else
+    {
+        if (SUCCEEDED(pConfig->GetConfigInt(QOS_CFG_RC_SLOWDOWN_RATE, lTemp)))
+        {
+            m_fSlowdownRate = (double)((double)lTemp/100.0);
+        }
+        else
+        {
+            m_fSlowdownRate = QOS_RC_DEFAULT_SLOWSEND_SCALAR;
+        }
+    }
+
+    if (m_fSlowdownRate < QOS_RC_SLOWSEND_MINLIMIT || m_fSlowdownRate > \
QOS_RC_SLOWSEND_MAXLIMIT) +    {
+        m_fSlowdownRate = QOS_RC_DEFAULT_SLOWSEND_SCALAR;
     }
 
     UpdateMaxRate();
@@ -1674,10 +1674,6 @@
         {
             m_bPassThrough = !((BOOL)lTemp);
         }
-        else
-        {
-            m_bPassThrough = TRUE;
-        }
         HX_RELEASE(pConfig);
 
         m_nProtocolOverhead = QOS_CC_RDT_TCP_IP_OVERHEAD;


_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic