[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-client-cvs
Subject: [Client-cvs] common/netio preftran.cpp,1.38,1.39
From: ping () helixcommunity ! org
Date: 2007-04-27 20:16:16
Message-ID: 200704272016.l3RKGcb6024396 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/client/common/netio
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv8134/common/netio
Modified Files:
preftran.cpp
Log Message:
- Added HELIX_FEATURE_TCP_OVER_UDP support when AutoTransport is enabled.
- Added "rtspu://" support to force UDP on a particular URL
Index: preftran.cpp
===================================================================
RCS file: /cvsroot/client/common/netio/preftran.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- preftran.cpp 4 Jan 2007 21:13:26 -0000 1.38
+++ preftran.cpp 27 Apr 2007 20:16:13 -0000 1.39
@@ -234,7 +234,7 @@
STDMETHODIMP
HXPreferredTransport::SetTransport(TransportMode /* IN */ prefTransportType,
- UINT16 /* IN */ ulCloakPort)
+ UINT16 /* IN */ ulCloakPort)
{
HX_RESULT rc = HXR_OK;
HXBOOL bSave = FALSE;
@@ -242,6 +242,30 @@
HX_ASSERT(UnknownMode != prefTransportType);
+ if (m_pOwner)
+ {
+ if (PTP_RTSP == m_prefTransportProtocol)
+ {
+ ulTransportMask = m_pOwner->m_ulRTSPTransportMask;
+ }
+ else
+ {
+ ulTransportMask = m_pOwner->m_ulPNMTransportMask;
+ }
+ }
+
+ // Don't set transportType if it falls out of the range(ulTransportMask)
+ //
+ // This could happen when the transport is explicitly specified in protocol
+ // scheme(i.e. rtspu for UDP) even though UDP is not selected. Such transport
+ // selection only applies to that particular URL, so we need to exclude it from
+ // preferred transport database which applies to all the URLs from a particular
+ // server
+ if (!(ulTransportMask & prefTransportType))
+ {
+ goto exit;
+ }
+
// we will mask UDP to Multicast if Multicast is selected given
// the fact the server will always try UDP along with Multicast request
if (UDPMode == prefTransportType && m_pOwner)
@@ -287,6 +311,8 @@
m_pOwner->TransportSet(this, bSave);
}
+exit:
+
return rc;
}
@@ -689,6 +715,11 @@
if (bAutoTransport)
{
ulTransportMask = ATTEMPT_AUTOTRANSPORT;
+
+ WritePrefUINT32(m_pPreferences, \
bRTSPProtocol?"AttemptRTSPvMulticast":"AttemptPNAvMulticast", \
(HXBOOL)(ulTransportMask & ATTEMPT_MULTICAST)); + \
WritePrefUINT32(m_pPreferences, bRTSPProtocol?"AttemptRTSPvUDP":"AttemptPNAvUDP", \
(HXBOOL)(ulTransportMask & ATTEMPT_UDP)); + WritePrefUINT32(m_pPreferences, \
bRTSPProtocol?"AttemptRTSPvTCP":"AttemptPNAvTCP", (HXBOOL)(ulTransportMask & \
ATTEMPT_TCP)); + WritePrefUINT32(m_pPreferences, \
bRTSPProtocol?"AttemptRTSPvHTTP":"AttemptPNAvHTTP", (HXBOOL)(ulTransportMask & \
ATTEMPT_HTTPCLOAK)); }
else
{
@@ -1528,12 +1559,20 @@
HX_ASSERT(UnknownMode != prefTransportType);
+#if defined(HELIX_FEATURE_TCP_OVER_UDP)
+ // TCPMode is the toppest on the transport switching list
+ if (TCPMode == prefTransportType)
+ {
+ goto cleanup;
+ }
+#else
// MulticastMode/UDPMode is the toppest on the transport switching list
if (MulticastMode == prefTransportType ||
UDPMode == prefTransportType)
{
goto cleanup;
}
+#endif /* HELIX_FEATURE_TCP_OVER_UDP */
if (PTP_RTSP == pPrefTransport->m_prefTransportProtocol)
{
_______________________________________________
Client-cvs mailing list
Client-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/client-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic