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

List:       helix-server-cvs
Subject:    [Server-cvs] protocol/rtsp crtspbase.cpp,1.20.2.18,1.20.2.19
From:       stiwary () helixcommunity ! org
Date:       2008-02-28 7:43:33
Message-ID: 200802280744.m1S7ikVZ020419 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/server/protocol/rtsp
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv20091

Modified Files:
      Tag: SERVER_12
	crtspbase.cpp 
Log Message:
Approved By: Jamie
Branches: Server_12_RN, Head

Synopsis
========
Fix for PR:213244:Helix Proxy: Variable 'PreferTCP' does not work.
Branch: HEAD , SERVER_12_RN.
Suggested Reviewer: Dean, Anyone

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

The problem why PreferTCP not getting selected for proxy is that we are
calling  RTSPTransportInstantiator::Init before setting useragent, In the init we are \
initializing m_preferTCP based on condition if m_bUseragentSetting which fails for \
proxy as we have not yet called set useragent. At present it works for server because \
user-agent header is coming in describe request too & from describe request we calls \
handlestream description which calls set useragent for server. But if it will come \
only in setup request then this will fail in server too. That's why we need to call \
setuser agent in base protocol's setup request.


Files Affected
===============
server\protocol\rtsp\crtspbase.cpp

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

Functional Tests:
-----------------
Tested the following senario:

Tested with variable PreferTCP & transport get selected is TCP but default is UDP. \
This works fine for server as well as proxy.

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

n/a

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

I performed Leak Test on Server as well as Proxy with 3 client. The number of stack \
count on Proxy was one with 52 byte prior as well as after my change. On Server there \
was only one stack of 36 byte before as well as my change.

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

n/a


Platforms Tested: win32-i386-vc7

Build Verified: win32-i386-vc7
        

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

Regards,

Sandeep 

Index: crtspbase.cpp
===================================================================
RCS file: /cvsroot/server/protocol/rtsp/crtspbase.cpp,v
retrieving revision 1.20.2.18
retrieving revision 1.20.2.19
diff -u -d -r1.20.2.18 -r1.20.2.19
--- crtspbase.cpp	22 Feb 2008 08:28:36 -0000	1.20.2.18
+++ crtspbase.cpp	28 Feb 2008 07:43:30 -0000	1.20.2.19
@@ -1530,6 +1530,11 @@
     CHXString sessionID;
     RTSPServerSession* pSession = NULL;
     UINT32 ulRDTFeatureLevel = 0;
+    
+    IHXBuffer* pUserAgentHdr = NULL;
+    IHXQoSProfileSelector* pProfileSelector = NULL;
+    IHXUserAgentSettings* pUAS = NULL;
+    IHXQoSProfileConfigurator* pProfileConfigurator = NULL;
 
     // Increment the "RTSP stream attempt" reg var
 
@@ -1820,6 +1825,7 @@
                     m_pSessionManager->findInstance(sessionID);
                 RTSPServerSession* pSessionNew =
                     GetSession(sessionID);
+                ClientSession* pClientSession = m_pClient->FindSession(sessionID);
 
                 IHXBuffer* pSessionStatsObjId = NULL;
 
@@ -1913,6 +1919,32 @@
                     pSessionNew->AddSessionHeader(m_pRespMsg);
                 }
 
+                // From setup request take header user-agent & call 
+                // SetUserAgentSettings this is needed in both proxy & server
+                // for server we are handling this in describe request but if \
user-agent is  +                // not available in describe request then call to set \
transport will fail. +                if (SUCCEEDED(pMsg->GetHeader("user-agent", \
pMIMEHeader)) && pClientSession) +                {
+                    IHXQoSSignalBus* pSignalBus = pClientSession->m_pSignalBus;
+                    pMIMEHeader->GetValueAsBuffer(pUserAgentHdr);
+                    m_pContext->QueryInterface(IID_IHXQoSProfileSelector, \
(void**)&pProfileSelector); +                    if(pSignalBus && \
SUCCEEDED(pSignalBus->QueryInterface( +                                            \
IID_IHXQoSProfileConfigurator, (void**)&pProfileConfigurator))) +                    \
{ +                        if(pProfileSelector && pProfileConfigurator)
+                        {
+                            pProfileSelector->SelectProfile(pUserAgentHdr, NULL, \
NULL, pUAS); +                            \
pProfileConfigurator->SetUserAgentSettings(pUAS); +                        }
+                    }
+                    HX_RELEASE(pUAS);
+                    HX_RELEASE(pProfileSelector);
+                    HX_RELEASE(pProfileConfigurator);
+                    HX_RELEASE(pUserAgentHdr);
+                }
+                HX_RELEASE(pMIMEHeader);
+
+
                 IHXMIMEHeader* pTransportMIMEType = 0;
                 rc = HXR_OK;
 


_______________________________________________
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