[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-protocol-cvs
Subject: [Protocol-cvs] rtsp rtspclnt.cpp,1.129,1.130
From: ping () helixcommunity ! org
Date: 2004-11-19 22:01:07
[Download RAW message or body]
Update of /cvsroot/protocol/rtsp
In directory cvs-new:/tmp/cvs-serv27812
Modified Files:
rtspclnt.cpp
Log Message:
- fixed crash when invalud UDP port/range specified in player preference, the client \
will now switch to TCP if TCP is enabled (b#129139)
- added several null-pointer check asserts
Index: rtspclnt.cpp
===================================================================
RCS file: /cvsroot/protocol/rtsp/rtspclnt.cpp,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- rtspclnt.cpp 18 Nov 2004 18:54:13 -0000 1.129
+++ rtspclnt.cpp 19 Nov 2004 22:01:05 -0000 1.130
@@ -3321,10 +3321,15 @@
IHXSocket* pRtpSocket = (IHXSocket*)
(*m_pUDPSocketStreamMap)[streamNumber];
- pRtpSocket->GetLocalAddr(&pRtpAddr);
-
IHXSocket* pRtcpSocket = (IHXSocket*)
(*m_pRTCPSocketStreamMap)[streamNumber];
+
+ // We should not get here if we fail to initialize the UDP sockets \
in + // InitSockets().
+ // We will either switch to TCP or error out if TCP is not \
available. + HX_ASSERT(pRtpSocket && pRtcpSocket);
+
+ pRtpSocket->GetLocalAddr(&pRtpAddr);
pRtcpSocket->GetLocalAddr(&pRtcpAddr);
if (HXR_OK != pTrans->init(m_pContext, pRtpSocket, this))
@@ -4761,6 +4766,8 @@
{
pStreamInfo = (RTSPStreamInfo*)(*i);
+ bGotSocket = FALSE;
+
CHXSimpleList::Iterator lIterator = pUDPPortList->Begin();
for (; lIterator != pUDPPortList->End(); ++lIterator)
{
@@ -4794,6 +4801,13 @@
{
break;
}
+ }
+
+ // bail out if we failed to create UDP sockets, HXR_NET_UDP is returned
+ // so we will attempt to switch to TCP if it's enabled
+ if (!bGotSocket)
+ {
+ hr = HXR_NET_UDP;
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic