|
List Info
Thread: CR-Client Bug 146155
|
|
| CR-Client Bug 146155 |

|
2006-05-25 16:20:17 |
Modified by: ajaiswal real.com
Date: 25-05-2006
Project: client/core
Branch:HEAD, hxclient_1_5_0_cayenne
Synopsis: 146155 [Client side ABD is not working as
expected, with proxy
CacheEnabled via TCP]
Overview:
Here the client is ignoring the ABD data when bandwidth is
constrained
between the client and the
proxy and failing to adjust the bandwidth when operating
through a proxy.
Fix:
In case of Proxy ::ConnectDone() first call
SendInitialMessage and then
try InitABD() followed by SessionSucceeded.
m_pSession and m_pSocket members are initialized in
::SendInitialMessage() and
immediately after this InitABD is performed. Also by now
SessionSucceeded()
is not yet
called m_bSessionSucceeded flag is FALSE.
While in the current logic in SendInitialMessage() although
we are setting
values
for m_pSession and m_pSocket members but before exiting off
::SendInitialMessage(),
m_pSession and m_pSocket again reset to NULL as
m_bSessionSucceeded is FALSE
Due to m_pSession == NULL, QI(IID_IHXAutoBWDetection) return
failure
causing InitABD() to fail.
SessionSucceeded() called later from
RTSPClientSession::ReadDone().
Current changes fixed the problem.
Files Modified:
/protocol/rtsp/rtspclnt.cpp
Image Size and Heap Use impact:
None
Platforms and Profiles Affected:
all
Distribution Libraries Affected:
none
Distribution library impact and planned action:
n/a
Platforms and Profiles Build Verified:
win32-i386-vc7, helix-client-all-defines
Platforms and Profiles Functionality verified:
win32-i386-vc6, helix-client-all-defines
Branch:
HEAD, hxclient_1_5_0_cayenne
Diffs:
================
cvs diff: Diffing .
Index: rtspclnt.cpp
============================================================
=======
RCS file: /cvsroot/protocol/rtsp/rtspclnt.cpp,v
retrieving revision 1.148.2.36
diff -u -w -r1.148.2.36 rtspclnt.cpp
--- rtspclnt.cpp 20 Apr 2006 08:17:42 -0000
1.148.2.36
+++ rtspclnt.cpp 25 May 2006 15:30:54 -0000
 -5269,8
+5269,9 
}
}
- HX_ASSERT(!m_pSession);
- HX_ASSERT(!m_pSocket);
+ HX_ASSERT(pSession);
+ HX_ASSERT(pSocket);
+
m_pSession = pSession;
m_pSocket = pSocket;
m_cloakPort =
pSession->m_pConnectAddr->GetPort();
 -8254,6
+8255,7 
if (!m_bSessionSucceeded)
{
HX_ASSERT(!m_pSession && !m_pSocket);
+ HX_ASSERT(pSession && pSocket);
m_pSession = pSession;
m_pSocket = pSocket;
}
 -8317,13
+8319,6 
}
}
-
- if (!m_bSessionSucceeded)
- {
- m_pSession = NULL;
- m_pSocket = NULL;
- }
-
m_pMutex->Unlock();
return rc;
cvs diff: Diffing include
cvs diff: Diffing pub
cvs diff: Diffing test
C:\Helix\cay150\protocol\rtsp>
=====
HX_RESULT
RTSPClientProtocol::sendInitialMessage(RTSPClientSession*
pSession,
IHXSocket* pSocket)
{
HXLOGL3(HXLOG_RTSP,
"RTSPClientProtocol[%p]::sendInitialMessage()",
this);
HX_RESULT rc = HXR_OK;
UINT32 seqNo = 0;
RTSPOptionsMessage* pMsg = NULL;
IHXBuffer* pBuffer = NULL;
m_pMutex->Lock();
// Assumption is we will send no options messages while
waiting
// for our session time out options response.
HX_ASSERT(!m_bKeepAlivePending);
if (!m_bSessionSucceeded)
{
HX_ASSERT(!m_pSession && !m_pSocket);
+ HX_ASSERT(pSession && pSocket) ;
m_pSession = pSession; <-------m_pSession
set to pSession
m_pSocket = pSocket;
}
...
...
-
- if (!m_bSessionSucceeded)
- {
- m_pSession = NULL; <-------m_pSession again
reset to NULL
- m_pSocket = NULL;
- }
-
}
_______________________________________________
Protocol-dev mailing list
Protocol-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/pr
otocol-dev
|
|
| CR-Client Bug 146155 |

|
2006-05-26 18:57:50 |
Anil,
Your findings is good, but the change doesn't fix the root
problem.
m_pSession and m_pSocket need to be reset if the RTSP
Session they're
belonged to can't be validated. This can happen for
HTTPCloaking and Proxy.
The asserts for both m_pSession and m_pSocket need to be
there since problem
arisen from changing m_pSession&m_pSocket on the fly can
be very hard to
detect without them.
For HTTPCloaking and Proxy, even though the connection is
established, we
have to postpone the session validation until we actually
receive response
from the server in ReadDone().
Reason being:
For HTTPCloaking, we perform cloaking ports scanning, there
might be
multiple successful connections, but only one of them
actually responses.
For Proxy, we establish the connection to the Proxy instead
of the server,
so a successful connection to the proxy doesn't guarantee a
successful RTSP
session to the server.
The cause of the problem is that InitDone() is called
*before* the session
is validated when proxy is used. I attached my proposed
fixes for your
reference, please verify.
Thanks
-->Henry
> -----Original Message-----
> From: protocol-dev-bounces helixcommunity.org
> [mailto:protocol-dev-bounces helixcommunity.org] On
Behalf Of
> Anil Jaiswal
> Sent: Thursday, May 25, 2006 9:20 AM
> To: protocol-dev helixcommunity.org
> Subject: [Protocol-dev] CR-Client Bug 146155 [Client
side ABD
> is not working as expected, with proxy CacheEnabled via
TCP]
>
> Modified by: ajaiswal real.com
> Date: 25-05-2006
> Project: client/core
> Branch:HEAD, hxclient_1_5_0_cayenne
>
> Synopsis: 146155 [Client side ABD is not working as
expected,
> with proxy CacheEnabled via TCP]
>
> Overview:
> Here the client is ignoring the ABD data when bandwidth
is
> constrained between the client and the proxy and
failing to
> adjust the bandwidth when operating through a proxy.
>
> Fix:
> In case of Proxy ::ConnectDone() first call
> SendInitialMessage and then try InitABD() followed by
> SessionSucceeded.
>
> m_pSession and m_pSocket members are initialized in
> ::SendInitialMessage() and
> immediately after this InitABD is performed. Also by
now
> SessionSucceeded() is not yet called
m_bSessionSucceeded flag
> is FALSE.
>
> While in the current logic in SendInitialMessage()
although
> we are setting values for m_pSession and m_pSocket
members
> but before exiting off ::SendInitialMessage(),
m_pSession and
> m_pSocket again reset to NULL as m_bSessionSucceeded
is FALSE
>
> Due to m_pSession == NULL, QI(IID_IHXAutoBWDetection)
return
> failure causing InitABD() to fail.
>
> SessionSucceeded() called later from
RTSPClientSession::ReadDone().
>
> Current changes fixed the problem.
>
> Files Modified:
> /protocol/rtsp/rtspclnt.cpp
>
> Image Size and Heap Use impact:
> None
>
> Platforms and Profiles Affected:
> all
>
> Distribution Libraries Affected:
> none
>
> Distribution library impact and planned action:
> n/a
>
> Platforms and Profiles Build Verified:
> win32-i386-vc7, helix-client-all-defines
>
> Platforms and Profiles Functionality verified:
> win32-i386-vc6, helix-client-all-defines
>
> Branch:
> HEAD, hxclient_1_5_0_cayenne
>
> Diffs:
> ================
> cvs diff: Diffing .
> Index: rtspclnt.cpp
>
============================================================
=======
> RCS file: /cvsroot/protocol/rtsp/rtspclnt.cpp,v
> retrieving revision 1.148.2.36
> diff -u -w -r1.148.2.36 rtspclnt.cpp
> --- rtspclnt.cpp 20 Apr 2006 08:17:42 -0000
1.148.2.36
> +++ rtspclnt.cpp 25 May 2006 15:30:54 -0000
>  -5269,8 +5269,9 
> }
> }
>
> - HX_ASSERT(!m_pSession);
> - HX_ASSERT(!m_pSocket);
> + HX_ASSERT(pSession);
> + HX_ASSERT(pSocket);
> +
> m_pSession = pSession;
> m_pSocket = pSocket;
> m_cloakPort =
pSession->m_pConnectAddr->GetPort();
>  -8254,6 +8255,7 
> if (!m_bSessionSucceeded)
> {
> HX_ASSERT(!m_pSession && !m_pSocket);
> + HX_ASSERT(pSession && pSocket);
> m_pSession = pSession;
> m_pSocket = pSocket;
> }
>  -8317,13 +8319,6 
> }
> }
>
> -
> - if (!m_bSessionSucceeded)
> - {
> - m_pSession = NULL;
> - m_pSocket = NULL;
> - }
> -
> m_pMutex->Unlock();
>
> return rc;
> cvs diff: Diffing include
> cvs diff: Diffing pub
> cvs diff: Diffing test
>
> C:\Helix\cay150\protocol\rtsp>
> =====
> HX_RESULT
>
RTSPClientProtocol::sendInitialMessage(RTSPClientSession*
pSession,
> IHXSocket*
pSocket) {
> HXLOGL3(HXLOG_RTSP,
>
"RTSPClientProtocol[%p]::sendInitialMessage()",
this);
>
> HX_RESULT rc = HXR_OK;
> UINT32 seqNo = 0;
> RTSPOptionsMessage* pMsg = NULL;
> IHXBuffer* pBuffer = NULL;
>
> m_pMutex->Lock();
>
> // Assumption is we will send no options messages
while waiting
> // for our session time out options response.
> HX_ASSERT(!m_bKeepAlivePending);
>
> if (!m_bSessionSucceeded)
> {
> HX_ASSERT(!m_pSession && !m_pSocket);
> + HX_ASSERT(pSession && pSocket) ;
> m_pSession = pSession;
<-------m_pSession set to pSession
> m_pSocket = pSocket;
> }
> ...
> ...
>
> -
> - if (!m_bSessionSucceeded)
> - {
> - m_pSession = NULL; <-------m_pSession
again reset to NULL
> - m_pSocket = NULL;
> - }
> -
> }
>
>
>
> _______________________________________________
> Protocol-dev mailing list
> Protocol-dev helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/pr
otocol-dev
? Makefile
? Umakefil.upp
? a
? dbg32
? protocol_rtsp.sln
? protocol_rtsp.vcproj
? protocol_rtsp_rtspclntdll.sln
? protocol_rtsp_rtspclntdll.vcproj
? protocol_rtsp_rtsplib.sln
? protocol_rtsp_rtsplib.vcproj
? pylinktmp-rtspclnt
? rtspclnt.def
? rtspclntdll.mak
? rtspclntdll.upp
? rtsplib.mak
? rtsplib.upp
? vc70.idb
Index: rtspclnt.cpp
============================================================
=======
RCS file: /cvsroot/protocol/rtsp/rtspclnt.cpp,v
retrieving revision 1.196
diff -u -w -4 -r1.196 rtspclnt.cpp
--- rtspclnt.cpp 16 May 2006 20:07:31 -0000 1.196
+++ rtspclnt.cpp 26 May 2006 18:56:06 -0000
 -1431,8
+1431,9 
STDMETHODIMP
RTSPClientSession::ConnectDone(HX_RESULT status)
{
HX_RESULT rc = HXR_OK;
+ HX_RESULT rcTemp = HXR_OK;
HXLOGL1(HXLOG_RTSP,
"RTSPClientSession[%p]::ConnectDone(): %08x",
this, status);
HX_ASSERT(m_pConnectingProt); // reset called while
connecting?
if (!m_pConnectingProt)
 -1451,8
+1452,21 
m_pConnectingProt->ReopenSocketDone(HXR_OK);
}
else
{
+ // Even though the connection is established, we
can't validate
+ // the RTSP session when we are in HTTPCloaking or
connecting to
+ // Proxy. For both cases, we have to postpone the
session validation
+ // until we actually receive response from the server
in ReadDone()
+ //
+ // Reason being:
+ // For HTTPCloaking, we perform cloaking ports
scanning, there might
+ // be multiple successful connections, but only one of
them actually
+ // responses.
+ //
+ // For Proxy, we establish the connection to the Proxy
instead of the
+ // server, so a successful connection to the proxy
doesn't guarantee
+ // a successful RTSP session to the actual server.
if (!m_bHTTPCloak && !m_bUseProxy)
{
m_bSetSessionCalled = TRUE;
 -1467,10
+1481,14 
}
}
else
{
- rc =
m_pConnectingProt->sendInitialMessage(this, m_pSocket);
- m_pConnectingProt->InitDone(rc);
+ rcTemp =
m_pConnectingProt->sendInitialMessage(this, m_pSocket);
+ // bailout if there is error
+ if (HXR_OK != rcTemp)
+ {
+ m_pConnectingProt->InitDone(rcTemp);
+ }
}
}
m_pMutex->Unlock();
 -2327,8
+2345,9 
m_bColumbia(FALSE),
m_bNoKeepAlive(FALSE),
m_bForceUCaseTransportMimeType(FALSE),
m_bReportedSuccessfulTransport(FALSE),
+ m_bInitMsgSent(FALSE),
m_bSDPInitiated(FALSE),
m_bMulticast(FALSE),
m_bIsLive(FALSE),
m_bInitDone(FALSE),
 -5276,8
+5295,10 
void
RTSPClientProtocol::SessionSucceeded(RTSPClientSession*
pSession,
IHXSocket* pSocket)
{
+ HX_RESULT rc = HXR_OK;
+
HXLOGL3(HXLOG_RTSP,
"RTSPClientProtocol[%p]::SessionSucceeded():
[%p]", this, pSession);
m_pMutex->Lock();
 -5298,12
+5319,15 
m_pSession = pSession;
m_pSocket = pSocket;
m_cloakPort =
pSession->m_pConnectAddr->GetPort();
+ if (!m_bInitMsgSent)
+ {
+ rc = sendInitialMessage(m_pSession, m_pSocket);
+ }
+
if (!m_bInitDone)
{
- m_bInitDone = TRUE;
- HX_RESULT rc = sendInitialMessage(m_pSession,
m_pSocket);
m_pResp->InitDone(rc);
}
m_pMutex->Unlock();
 -8338,8
+8362,10 
IHXBuffer* pBuffer = NULL;
m_pMutex->Lock();
+ m_bInitMsgSent = TRUE;
+
if (!m_bSessionSucceeded)
{
HX_ASSERT(!m_pSession && !m_pSocket);
m_pSession = pSession;
 -8404,9
+8430,8 
rc =
m_pPipelinedDescLogic->OnOptionsSent(pMsg);
}
}
-
if (!m_bSessionSucceeded)
{
m_pSession = NULL;
m_pSocket = NULL;
Index: pub/rtspclnt.h
============================================================
=======
RCS file: /cvsroot/protocol/rtsp/pub/rtspclnt.h,v
retrieving revision 1.83
diff -u -w -4 -r1.83 rtspclnt.h
--- pub/rtspclnt.h 16 May 2006 20:07:33 -0000 1.83
+++ pub/rtspclnt.h 26 May 2006 18:56:06 -0000
 -1272,8
+1272,9 
HXBOOL m_bNoKeepAlive;
HXBOOL
m_bForceUCaseTransportMimeType;
HXBOOL
m_bReportedSuccessfulTransport;
+ HXBOOL m_bInitMsgSent;
HXBOOL m_bSDPInitiated;
HXBOOL m_bMulticast;
HXBOOL m_bIsLive;
HXBOOL m_bInitDone;
_______________________________________________
Protocol-dev mailing list
Protocol-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/pr
otocol-dev
|
|
| RESEND CR-Client Bug 146155 [Client side
ABD is not working as expected, with
proxy CacheEnabled via |

|
2006-06-12 14:42:56 |
At 09:50 PM 5/25/2006, Anil Jaiswal wrote:
>Modified by: ajaiswal real.com
>Date: 25-05-2006
>Project: client/core
>Branch:HEAD, hxclient_1_5_0_cayenne
>
>Synopsis: 146155 [Client side ABD is not working as
expected, with proxy
>CacheEnabled via TCP]
>
>Overview:
>Here the client is ignoring the ABD data when bandwidth
is constrained
>between the client and the
>proxy and failing to adjust the bandwidth when operating
through a proxy.
>
>Fix:
>In case of Proxy ::ConnectDone() first call
SendInitialMessage and then
>try InitABD() followed by SessionSucceeded.
>
>m_pSession and m_pSocket members are initialized in
>::SendInitialMessage() and
>immediately after this InitABD is performed. Also by now
>SessionSucceeded() is not yet
>called m_bSessionSucceeded flag is FALSE.
>
>While in the current logic in SendInitialMessage()
although we are setting
>values
>for m_pSession and m_pSocket members but before exiting
off
>::SendInitialMessage(),
>m_pSession and m_pSocket again reset to NULL as
m_bSessionSucceeded is FALSE
>
>Due to m_pSession == NULL, QI(IID_IHXAutoBWDetection)
return failure
>causing InitABD() to fail.
>
>SessionSucceeded() called later from
RTSPClientSession::ReadDone().
>
>Current changes fixed the problem.
>
>Files Modified:
>/protocol/rtsp/rtspclnt.cpp
>
>Image Size and Heap Use impact:
>None
>
>Platforms and Profiles Affected:
>all
>
>Distribution Libraries Affected:
>none
>
>Distribution library impact and planned action:
>n/a
>
>Platforms and Profiles Build Verified:
>win32-i386-vc7, helix-client-all-defines
>
>Platforms and Profiles Functionality verified:
>win32-i386-vc6, helix-client-all-defines
>
>Branch:
>HEAD, hxclient_1_5_0_cayenne
>
>Diffs:
>================
>cvs diff: Diffing .
>Index: rtspclnt.cpp
>========================================================
===========
>RCS file: /cvsroot/protocol/rtsp/rtspclnt.cpp,v
>retrieving revision 1.148.2.36
>diff -u -w -r1.148.2.36 rtspclnt.cpp
>--- rtspclnt.cpp 20 Apr 2006 08:17:42 -0000
1.148.2.36
>+++ rtspclnt.cpp 25 May 2006 15:30:54 -0000
> -5269,8 +5269,9 
> }
> }
>
>- HX_ASSERT(!m_pSession);
>- HX_ASSERT(!m_pSocket);
>+ HX_ASSERT(pSession);
>+ HX_ASSERT(pSocket);
>+
> m_pSession = pSession;
> m_pSocket = pSocket;
> m_cloakPort =
pSession->m_pConnectAddr->GetPort();
> -8254,6 +8255,7 
> if (!m_bSessionSucceeded)
> {
> HX_ASSERT(!m_pSession && !m_pSocket);
>+ HX_ASSERT(pSession && pSocket);
> m_pSession = pSession;
> m_pSocket = pSocket;
> }
> -8317,13 +8319,6 
> }
> }
>
>-
>- if (!m_bSessionSucceeded)
>- {
>- m_pSession = NULL;
>- m_pSocket = NULL;
>- }
>-
> m_pMutex->Unlock();
>
> return rc;
>cvs diff: Diffing include
>cvs diff: Diffing pub
>cvs diff: Diffing test
>
>C:\Helix\cay150\protocol\rtsp>
>=====
>HX_RESULT
>RTSPClientProtocol::sendInitialMessage(RTSPClientSession
* pSession,
> IHXSocket*
pSocket)
>{
> HXLOGL3(HXLOG_RTSP,
"RTSPClientProtocol[%p]::sendInitialMessage()",
> this);
>
> HX_RESULT rc = HXR_OK;
> UINT32 seqNo = 0;
> RTSPOptionsMessage* pMsg = NULL;
> IHXBuffer* pBuffer = NULL;
>
> m_pMutex->Lock();
>
> // Assumption is we will send no options messages
while waiting
> // for our session time out options response.
> HX_ASSERT(!m_bKeepAlivePending);
>
> if (!m_bSessionSucceeded)
> {
> HX_ASSERT(!m_pSession && !m_pSocket);
>+ HX_ASSERT(pSession && pSocket) ;
> m_pSession = pSession;
<-------m_pSession set to pSession
> m_pSocket = pSocket;
> }
>...
>...
>
>-
>- if (!m_bSessionSucceeded)
>- {
>- m_pSession = NULL; <-------m_pSession again
reset to NULL
>- m_pSocket = NULL;
>- }
>-
>}
_______________________________________________
Protocol-dev mailing list
Protocol-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/pr
otocol-dev
|
|
| RESEND CR-Client Bug 146155 [Client side
ABD is not working as expected, with
proxy CacheEnabled via |

|
2006-06-12 14:51:52 |
Please ignore this email. I send it by mistake.
Thanks and regards
~Anil Jaiswal
At 08:12 PM 6/12/2006, Anil Jaiswal wrote:
>At 09:50 PM 5/25/2006, Anil Jaiswal wrote:
>>Modified by: ajaiswal real.com
>>Date: 25-05-2006
>>Project: client/core
>>Branch:HEAD, hxclient_1_5_0_cayenne
>>
>>Synopsis: 146155 [Client side ABD is not working as
expected, with proxy
>>CacheEnabled via TCP]
>>
>>Overview:
>>Here the client is ignoring the ABD data when
bandwidth is constrained
>>between the client and the
>>proxy and failing to adjust the bandwidth when
operating through a proxy.
>>
>>Fix:
>>In case of Proxy ::ConnectDone() first call
SendInitialMessage and then
>>try InitABD() followed by SessionSucceeded.
>>
>>m_pSession and m_pSocket members are initialized in
>>::SendInitialMessage() and
>>immediately after this InitABD is performed. Also by
now
>>SessionSucceeded() is not yet
>>called m_bSessionSucceeded flag is FALSE.
>>
>>While in the current logic in SendInitialMessage()
although we are
>>setting values
>>for m_pSession and m_pSocket members but before
exiting off
>>::SendInitialMessage(),
>>m_pSession and m_pSocket again reset to NULL as
m_bSessionSucceeded is FALSE
>>
>>Due to m_pSession == NULL,
QI(IID_IHXAutoBWDetection) return failure
>>causing InitABD() to fail.
>>
>>SessionSucceeded() called later from
RTSPClientSession::ReadDone().
>>
>>Current changes fixed the problem.
>>
>>Files Modified:
>>/protocol/rtsp/rtspclnt.cpp
>>
>>Image Size and Heap Use impact:
>>None
>>
>>Platforms and Profiles Affected:
>>all
>>
>>Distribution Libraries Affected:
>>none
>>
>>Distribution library impact and planned action:
>>n/a
>>
>>Platforms and Profiles Build Verified:
>>win32-i386-vc7, helix-client-all-defines
>>
>>Platforms and Profiles Functionality verified:
>>win32-i386-vc6, helix-client-all-defines
>>
>>Branch:
>>HEAD, hxclient_1_5_0_cayenne
>>
>>Diffs:
>>================
>>cvs diff: Diffing .
>>Index: rtspclnt.cpp
>>====================================================
===============
>>RCS file: /cvsroot/protocol/rtsp/rtspclnt.cpp,v
>>retrieving revision 1.148.2.36
>>diff -u -w -r1.148.2.36 rtspclnt.cpp
>>--- rtspclnt.cpp 20 Apr 2006 08:17:42 -0000
1.148.2.36
>>+++ rtspclnt.cpp 25 May 2006 15:30:54 -0000
>> -5269,8 +5269,9 
>> }
>> }
>>
>>- HX_ASSERT(!m_pSession);
>>- HX_ASSERT(!m_pSocket);
>>+ HX_ASSERT(pSession);
>>+ HX_ASSERT(pSocket);
>>+
>> m_pSession = pSession;
>> m_pSocket = pSocket;
>> m_cloakPort =
pSession->m_pConnectAddr->GetPort();
>> -8254,6 +8255,7 
>> if (!m_bSessionSucceeded)
>> {
>> HX_ASSERT(!m_pSession &&
!m_pSocket);
>>+ HX_ASSERT(pSession && pSocket);
>> m_pSession = pSession;
>> m_pSocket = pSocket;
>> }
>> -8317,13 +8319,6 
>> }
>> }
>>
>>-
>>- if (!m_bSessionSucceeded)
>>- {
>>- m_pSession = NULL;
>>- m_pSocket = NULL;
>>- }
>>-
>> m_pMutex->Unlock();
>>
>> return rc;
>>cvs diff: Diffing include
>>cvs diff: Diffing pub
>>cvs diff: Diffing test
>>
>>C:\Helix\cay150\protocol\rtsp>
>>=====
>>HX_RESULT
>>RTSPClientProtocol::sendInitialMessage(RTSPClientSes
sion* pSession,
>> IHXSocket*
pSocket)
>>{
>> HXLOGL3(HXLOG_RTSP,
"RTSPClientProtocol[%p]::sendInitialMessage()",
>> this);
>>
>> HX_RESULT rc = HXR_OK;
>> UINT32 seqNo = 0;
>> RTSPOptionsMessage* pMsg = NULL;
>> IHXBuffer* pBuffer = NULL;
>>
>> m_pMutex->Lock();
>>
>> // Assumption is we will send no options
messages while waiting
>> // for our session time out options response.
>> HX_ASSERT(!m_bKeepAlivePending);
>>
>> if (!m_bSessionSucceeded)
>> {
>> HX_ASSERT(!m_pSession &&
!m_pSocket);
>>+ HX_ASSERT(pSession && pSocket) ;
>> m_pSession = pSession;
<-------m_pSession set to pSession
>> m_pSocket = pSocket;
>> }
>>...
>>...
>>
>>-
>>- if (!m_bSessionSucceeded)
>>- {
>>- m_pSession = NULL; <-------m_pSession
again reset to NULL
>>- m_pSocket = NULL;
>>- }
>>-
>>}
_______________________________________________
Protocol-dev mailing list
Protocol-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/pr
otocol-dev
|
|
| CR-Client (modified) Bug 146155 [Client
side ABD is not working as expected,
with proxy CacheEnabled |

|
2006-06-13 13:40:44 |
Please find the modified CR.
At 09:50 PM 5/25/2006, Anil Jaiswal wrote:
>Modified by: ajaiswal real.com
>Date: 25-05-2006
>Project: client/core
>Branch:HEAD, hxclient_1_5_0_cayenne
>
>Synopsis: 146155 [Client side ABD is not working as
expected, with proxy
>CacheEnabled via TCP]
>
>Overview:
>Here the client is ignoring the ABD data when bandwidth
is constrained
>between the client and the
>proxy and failing to adjust the bandwidth when operating
through a proxy.
>
>Fix:
>In case of Proxy ::ConnectDone() first call
SendInitialMessage and then
>try InitABD() followed by SessionSucceeded.
>
>m_pSession and m_pSocket members are initialized in
>::SendInitialMessage() and
>immediately after this InitABD is performed. Also by now
>SessionSucceeded() is not yet
>called m_bSessionSucceeded flag is FALSE.
>
>While in the current logic in SendInitialMessage()
although we are setting
>values
>for m_pSession and m_pSocket members but before exiting
off
>::SendInitialMessage(),
>m_pSession and m_pSocket again reset to NULL as
m_bSessionSucceeded is FALSE
>
>Due to m_pSession == NULL, QI(IID_IHXAutoBWDetection)
return failure
>causing InitABD() to fail.
>
>SessionSucceeded() called later from
RTSPClientSession::ReadDone().
>
>Current changes fixed the problem.
Henry's review comments:
m_pSession and m_pSocket need to be reset if the RTSP
Session they're
belonged to can't be validated. This can happen for
HTTPCloaking and Proxy.
The asserts for both m_pSession and m_pSocket need to be
there since problem
arisen from changing m_pSession&m_pSocket on the fly can
be very hard to
detect without them.
For HTTPCloaking and Proxy, even though the connection is
established, we
have to postpone the session validation until we actually
receive response
from the server in ReadDone().
Reason being:
For HTTPCloaking, we perform cloaking ports scanning, there
might be
multiple successful connections, but only one of them
actually responses.
For Proxy, we establish the connection to the Proxy instead
of the server,
so a successful connection to the proxy doesn't guarantee a
successful RTSP
session to the server.
The cause of the problem is that InitDone() is called
*before* the session
is validated when proxy is used.
>Files Modified:
>/protocol/rtsp/rtspclnt.cpp
/protocol/rtsp/pub/rtspclnt.h
>Image Size and Heap Use impact:
>None
>
>Platforms and Profiles Affected:
>all
>
>Distribution Libraries Affected:
>none
>
>Distribution library impact and planned action:
>n/a
>
>Platforms and Profiles Build Verified:
>win32-i386-vc7, helix-client-all-defines
>
>Platforms and Profiles Functionality verified:
>win32-i386-vc7, helix-client-all-defines
Now the Bandwidth header in the PLAY changes when the client
<-> proxy
connection is constrained.
Test results :
1)
PLAY rtsp://10.112.41.96:554/realvideo10.rm/ RTSP/1.0
CSeq: 8
User-Agent: RealMedia Player (HelixDNAClient)/10.0.0.7821
(win32)
Session: 1595-1
Range: npt=0-62.328000
Bandwidth: 36090000
2)
PLAY rtsp://10.112.41.96:554/realvideo10.rm/ RTSP/1.0
CSeq: 8
User-Agent: RealMedia Player (HelixDNAClient)/10.0.0.7821
(win32)
Session: 1599-1
Range: npt=0-62.328000
Bandwidth: 42666000
>Branch:
>HEAD, hxclient_1_5_0_cayenne
>
>Diffs:
Index: rtspclnt.cpp
============================================================
=======
RCS file: /cvsroot/protocol/rtsp/rtspclnt.cpp,v
retrieving revision 1.148.2.38
diff -u -w -r1.148.2.38 rtspclnt.cpp
--- rtspclnt.cpp 17 May 2006 15:48:51 -0000
1.148.2.38
+++ rtspclnt.cpp 13 Jun 2006 13:05:26 -0000
 -1383,7
+1383,7 
RTSPClientSession::ConnectDone(HX_RESULT status)
{
HX_RESULT rc = HXR_OK;
+ HX_RESULT rcTemp = HXR_OK;
HXLOGL1(HXLOG_RTSP,
"RTSPClientSession[%p]::ConnectDone(): %08x",
this, status);
HX_ASSERT(m_pConnectingProt); // reset called while
connecting?
if (!m_pConnectingProt)
 -1403,6
+1403,19 
}
else
{
+ // Even though the connection is established, we
can't validate
+ // the RTSP session when we are in HTTPCloaking
or connecting to
+ // Proxy. For both cases, we have to postpone
the session
validation
+ // until we actually receive response from the
server in ReadDone()
+ //
+ // Reason being:
+ // For HTTPCloaking, we perform cloaking ports
scanning, there
might
+ // be multiple successful connections, but only
one of them
actually
+ // responses.
+ //
+ // For Proxy, we establish the connection to the
Proxy instead
of the
+ // server, so a successful connection to the
proxy doesn't
guarantee
+ // a successful RTSP session to the actual
server.
if (!m_bHTTPCloak && !m_bUseProxy)
{
m_bSetSessionCalled = TRUE;
 -1419,8
+1432,12 
}
else
{
- rc =
m_pConnectingProt->sendInitialMessage(this, m_pSocket);
- m_pConnectingProt->InitDone(rc);
+ rcTemp =
m_pConnectingProt->sendInitialMessage(this,
m_pSocket);
+ // bailout if there is error
+ if (HXR_OK != rcTemp)
+ {
+ m_pConnectingProt->InitDone(rcTemp);
+ }
}
}
 -2300,6
+2317,7 
m_bNoKeepAlive(FALSE),
m_bForceUCaseTransportMimeType(FALSE),
m_bReportedSuccessfulTransport(FALSE),
+ m_bInitMsgSent(FALSE),
m_bSDPInitiated(FALSE),
m_bMulticast(FALSE),
m_bIsLive(FALSE),
 -5255,6
+5273,8 
RTSPClientProtocol::SessionSucceeded(RTSPClientSession*
pSession,
IHXSocket* pSocket)
{
+ HX_RESULT rc = HXR_OK;
+
HXLOGL3(HXLOG_RTSP,
"RTSPClientProtocol[%p]::SessionSucceeded():
[%p]", this, pSession);
m_pMutex->Lock();
 -5277,10
+5297,13 
m_pSocket = pSocket;
m_cloakPort =
pSession->m_pConnectAddr->GetPort();
+ if (!m_bInitMsgSent)
+ {
+ rc = sendInitialMessage(m_pSession, m_pSocket);
+ }
+
if (!m_bInitDone)
{
- m_bInitDone = TRUE;
- HX_RESULT rc = sendInitialMessage(m_pSession,
m_pSocket);
m_pResp->InitDone(rc);
}
 -8291,6
+8314,8 
// for our session time out options response.
HX_ASSERT(!m_bKeepAlivePending);
+ m_bInitMsgSent = TRUE;
+
if (!m_bSessionSucceeded)
{
HX_ASSERT(!m_pSession && !m_pSocket);
Index: pub/rtspclnt.h
============================================================
=======
RCS file: /cvsroot/protocol/rtsp/pub/rtspclnt.h,v
retrieving revision 1.63.2.14
diff -u -w -r1.63.2.14 rtspclnt.h
--- pub/rtspclnt.h 17 May 2006 15:48:50 -0000
1.63.2.14
+++ pub/rtspclnt.h 13 Jun 2006 13:05:28 -0000
 -1258,6
+1258,8 
HXBOOL
m_bReportedSuccessfulTransport;
HXBOOL m_bSDPInitiated;
+ HXBOOL m_bInitMsgSent;
+
HXBOOL m_bMulticast;
HXBOOL m_bIsLive;
HXBOOL m_bInitDone;
Thanks and regards,
~Anil Jaiswal
_______________________________________________
Protocol-dev mailing list
Protocol-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/pr
otocol-dev
|
|
| CR-Client (modified) Bug 146155 [Client
side ABD is not working as expected,
with proxy CacheEnabled |

|
2006-06-13 16:04:09 |
Looks good.
-->Henry
> -----Original Message-----
> From: protocol-dev-bounces helixcommunity.org
> [mailto:protocol-dev-bounces helixcommunity.org] On
Behalf Of
> Anil Jaiswal
> Sent: Tuesday, June 13, 2006 6:41 AM
> To: protocol-dev helixcommunity.org
> Subject: [Protocol-dev] CR-Client (modified) Bug 146155
> [Client side ABD is not working as expected, with proxy
> CacheEnabled via TCP]
>
> Please find the modified CR.
>
> At 09:50 PM 5/25/2006, Anil Jaiswal wrote:
> >Modified by: ajaiswal real.com
> >Date: 25-05-2006
> >Project: client/core
> >Branch:HEAD, hxclient_1_5_0_cayenne
> >
> >Synopsis: 146155 [Client side ABD is not working as
expected, with
> >proxy CacheEnabled via TCP]
> >
> >Overview:
> >Here the client is ignoring the ABD data when
bandwidth is
> constrained
> >between the client and the proxy and failing to
adjust the bandwidth
> >when operating through a proxy.
> >
> >Fix:
> >In case of Proxy ::ConnectDone() first call
SendInitialMessage and
> >then try InitABD() followed by SessionSucceeded.
> >
> >m_pSession and m_pSocket members are initialized
in
> >::SendInitialMessage() and
> >immediately after this InitABD is performed. Also
by now
> >SessionSucceeded() is not yet
> >called m_bSessionSucceeded flag is FALSE.
> >
> >While in the current logic in SendInitialMessage()
although we are
> >setting values for m_pSession and m_pSocket
members but
> before exiting
> >off ::SendInitialMessage(), m_pSession and
m_pSocket again reset to
> >NULL as m_bSessionSucceeded is FALSE
> >
> >Due to m_pSession == NULL,
QI(IID_IHXAutoBWDetection) return failure
> >causing InitABD() to fail.
> >
> >SessionSucceeded() called later from
RTSPClientSession::ReadDone().
> >
> >Current changes fixed the problem.
>
> Henry's review comments:
> m_pSession and m_pSocket need to be reset if the RTSP
Session
> they're belonged to can't be validated. This can
happen for
> HTTPCloaking and Proxy.
> The asserts for both m_pSession and m_pSocket need to
be
> there since problem arisen from changing
m_pSession&m_pSocket
> on the fly can be very hard to detect without them.
>
> For HTTPCloaking and Proxy, even though the connection
is
> established, we have to postpone the session validation
until
> we actually receive response from the server in
ReadDone().
>
> Reason being:
> For HTTPCloaking, we perform cloaking ports scanning,
there
> might be multiple successful connections, but only one
of
> them actually responses.
>
> For Proxy, we establish the connection to the Proxy
instead
> of the server, so a successful connection to the proxy
> doesn't guarantee a successful RTSP session to the
server.
>
> The cause of the problem is that InitDone() is called
> *before* the session is validated when proxy is used.
>
> >Files Modified:
> >/protocol/rtsp/rtspclnt.cpp
> /protocol/rtsp/pub/rtspclnt.h
>
> >Image Size and Heap Use impact:
> >None
> >
> >Platforms and Profiles Affected:
> >all
> >
> >Distribution Libraries Affected:
> >none
> >
> >Distribution library impact and planned action:
> >n/a
> >
> >Platforms and Profiles Build Verified:
> >win32-i386-vc7, helix-client-all-defines
> >
> >Platforms and Profiles Functionality verified:
> >win32-i386-vc7, helix-client-all-defines
>
> Now the Bandwidth header in the PLAY changes when the
client
> <-> proxy connection is constrained.
>
> Test results :
> 1)
> PLAY rtsp://10.112.41.96:554/realvideo10.rm/ RTSP/1.0
> CSeq: 8
> User-Agent: RealMedia Player
(HelixDNAClient)/10.0.0.7821 (win32)
> Session: 1595-1
> Range: npt=0-62.328000
> Bandwidth: 36090000
>
> 2)
> PLAY rtsp://10.112.41.96:554/realvideo10.rm/ RTSP/1.0
> CSeq: 8
> User-Agent: RealMedia Player
(HelixDNAClient)/10.0.0.7821 (win32)
> Session: 1599-1
> Range: npt=0-62.328000
> Bandwidth: 42666000
>
> >Branch:
> >HEAD, hxclient_1_5_0_cayenne
> >
> >Diffs:
> Index: rtspclnt.cpp
>
============================================================
=======
> RCS file: /cvsroot/protocol/rtsp/rtspclnt.cpp,v
> retrieving revision 1.148.2.38
> diff -u -w -r1.148.2.38 rtspclnt.cpp
> --- rtspclnt.cpp 17 May 2006 15:48:51 -0000
1.148.2.38
> +++ rtspclnt.cpp 13 Jun 2006 13:05:26 -0000
>  -1383,7 +1383,7 
> RTSPClientSession::ConnectDone(HX_RESULT status)
> {
> HX_RESULT rc = HXR_OK;
> + HX_RESULT rcTemp = HXR_OK;
> HXLOGL1(HXLOG_RTSP,
> "RTSPClientSession[%p]::ConnectDone():
%08x", this, status);
> HX_ASSERT(m_pConnectingProt); // reset called
while connecting?
> if (!m_pConnectingProt)
>  -1403,6 +1403,19 
> }
> else
> {
> + // Even though the connection is
established, we
> can't validate
> + // the RTSP session when we are in
HTTPCloaking
> or connecting to
> + // Proxy. For both cases, we have to
postpone the session
> validation
> + // until we actually receive response from
the
> server in ReadDone()
> + //
> + // Reason being:
> + // For HTTPCloaking, we perform cloaking
ports scanning,
> + there
> might
> + // be multiple successful connections, but
only
> one of them
> actually
> + // responses.
> + //
> + // For Proxy, we establish the connection
to the Proxy
> + instead
> of the
> + // server, so a successful connection to
the proxy doesn't
> guarantee
> + // a successful RTSP session to the actual
server.
> if (!m_bHTTPCloak &&
!m_bUseProxy)
> {
> m_bSetSessionCalled = TRUE;  -1419,8
+1432,12 
> }
> else
> {
> - rc =
> m_pConnectingProt->sendInitialMessage(this,
m_pSocket);
> - m_pConnectingProt->InitDone(rc);
> + rcTemp =
m_pConnectingProt->sendInitialMessage(this,
> m_pSocket);
> + // bailout if there is error
> + if (HXR_OK != rcTemp)
> + {
> +
m_pConnectingProt->InitDone(rcTemp);
> + }
> }
> }
>
>  -2300,6 +2317,7 
> m_bNoKeepAlive(FALSE),
> m_bForceUCaseTransportMimeType(FALSE),
> m_bReportedSuccessfulTransport(FALSE),
> + m_bInitMsgSent(FALSE),
> m_bSDPInitiated(FALSE),
> m_bMulticast(FALSE),
> m_bIsLive(FALSE),
>  -5255,6 +5273,8 
>
RTSPClientProtocol::SessionSucceeded(RTSPClientSession*
pSession,
> IHXSocket*
pSocket)
> {
> + HX_RESULT rc = HXR_OK;
> +
> HXLOGL3(HXLOG_RTSP,
> "RTSPClientProtocol[%p]::SessionSucceeded():
> [%p]", this, pSession);
>
> m_pMutex->Lock();
>  -5277,10 +5297,13 
> m_pSocket = pSocket;
> m_cloakPort =
pSession->m_pConnectAddr->GetPort();
>
> + if (!m_bInitMsgSent)
> + {
> + rc = sendInitialMessage(m_pSession, m_pSocket);
> + }
> +
> if (!m_bInitDone)
> {
> - m_bInitDone = TRUE;
> - HX_RESULT rc = sendInitialMessage(m_pSession,
m_pSocket);
> m_pResp->InitDone(rc);
> }
>
>  -8291,6 +8314,8 
> // for our session time out options response.
> HX_ASSERT(!m_bKeepAlivePending);
>
> + m_bInitMsgSent = TRUE;
> +
> if (!m_bSessionSucceeded)
> {
> HX_ASSERT(!m_pSession && !m_pSocket);
> Index: pub/rtspclnt.h
>
============================================================
=======
> RCS file: /cvsroot/protocol/rtsp/pub/rtspclnt.h,v
> retrieving revision 1.63.2.14
> diff -u -w -r1.63.2.14 rtspclnt.h
> --- pub/rtspclnt.h 17 May 2006 15:48:50 -0000
1.63.2.14
> +++ pub/rtspclnt.h 13 Jun 2006 13:05:28 -0000
>  -1258,6 +1258,8 
> HXBOOL
> m_bReportedSuccessfulTransport;
>
> HXBOOL
m_bSDPInitiated;
> + HXBOOL m_bInitMsgSent;
> +
> HXBOOL m_bMulticast;
> HXBOOL m_bIsLive;
> HXBOOL m_bInitDone;
>
>
> Thanks and regards,
> ~Anil Jaiswal
>
>
>
>
> _______________________________________________
> Protocol-dev mailing list
> Protocol-dev helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/pr
otocol-dev
_______________________________________________
Protocol-dev mailing list
Protocol-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/pr
otocol-dev
|
|
[1-6]
|
|