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

List:       helix-protocol-cvs
Subject:    [Protocol-cvs] rtsp rtspclnt.cpp,1.221.2.18.12.1,1.221.2.18.12.2
From:       tzupan () helixcommunity ! org
Date:       2011-05-23 23:18:02
Message-ID: 201105232318.p4NNI9Ia030246 () mailer ! progressive-comp ! com
[Download RAW message or body]

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

Modified Files:
      Tag: realplayer14
	rtspclnt.cpp 
Log Message:
sending HXR_NET_SOCKET_INVALID error on read failure to ensure failover reconnection

Index: rtspclnt.cpp
===================================================================
RCS file: /cvsroot/protocol/rtsp/rtspclnt.cpp,v
retrieving revision 1.221.2.18.12.1
retrieving revision 1.221.2.18.12.2
diff -u -d -r1.221.2.18.12.1 -r1.221.2.18.12.2
--- rtspclnt.cpp	16 Mar 2011 00:40:52 -0000	1.221.2.18.12.1
+++ rtspclnt.cpp	23 May 2011 23:17:59 -0000	1.221.2.18.12.2
@@ -818,6 +818,30 @@
                HX_RESULT hxr = m_pSocket->Read(&pBuf);
                if (hxr != HXR_SOCK_WOULDBLOCK)
                {
+				   if(FAILED(hxr))
+				   {
+					   // Send error to all valid prots in list:
+					   CHXSimpleList::Iterator i;
+					   for(i=m_protList.Begin();i!=m_protList.End();++i)
+					   {
+						   RTSPClientProtocolInfo* pInfo = (RTSPClientProtocolInfo*)(*i);
+						   if (pInfo  &&  pInfo->m_pProt)
+						   {
+							   // we shouldn't get CLOSE event when we(the client) close the socket when m_bSessionDone 
+							   HX_ASSERT(!m_bSessionDone);
+
+							   HX_RESULT hxrslt = status;
+							   if (HXR_OUTOFMEMORY != hxrslt && !m_bSessionDone)
+							   {
+								   // Call OnProtocolError with this value so
+								   // reconnect will be attempted (fixes PR 135700):
+								   hxrslt = HXR_NET_SOCKET_INVALID;
+							   }
+
+							   pInfo->m_pProt->OnProtocolError(hxrslt);
+						   }
+					   }
+				   }
                    ReadDone(hxr, pBuf);
                }
                HX_RELEASE(pBuf);


_______________________________________________
Protocol-cvs mailing list
Protocol-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/protocol-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

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