[Helix-server-dev] Helix servers always responds '451' to GET_PARAMETER
ext-jesus.1.rodriguez at nokia.com ext-jesus.1.rodriguez at nokia.comHello,
I am working on some issues regarding the Symbian client, and I noticed that the server always responds '451' to a GET_PARAMETER request:
<client>
GET_PARAMETER * RTSP/1.0
CSeq: 4
User-Agent: RealMedia Player HelixDNAClient/10.0.0.6839 (symbian)
Session: 45-1
AutoBWDetection: 1
AutoBWDetectionPackets: 2
AutoBWDetectionPacketSize: 1200
Content-type: text/rtsp-parameters
Content-length: 3
ABD
</client>
<server>
RTSP/1.0 451 Parameter Not Understood
CSeq: 4
Date: Thu,06 Nov 2008 18:31:28 GMT
Session: 45-1;timeout=79
AutoBWDetection: 1
</server>
At first I thought the client was in fact sending an unsupported param, but I later tried the request with no content body and I got the same result:
<client>
GET_PARAMETER * RTSP/1.0
CSeq: 4
User-Agent: RealMedia Player HelixDNAClient/10.0.0.6839 (symbian)
Session: 49-1
AutoBWDetection: 1
AutoBWDetectionPackets: 2
AutoBWDetectionPacketSize: 1200
</client>
<server>
RTSP/1.0 451 Parameter Not Understood
CSeq: 4
Date: Thu,06 Nov 2008 21:31:34 GMT
Session: 49-1;timeout=79
AutoBWDetection: 1
</server>
Long story short, I got my hands on some public server code and I found this on /server/protocol/rtsp/crtspbase.cpp (truncated for brevity):
HX_RESULT
CRTSPBaseProtocol::OnGetParameterRequest(IHXRTSPRequestMessage* pReqMsg)
{
HX_RESULT rc = HXR_OK;
//...
OnClientRequestEvent(pReqMsg, pMsg, pSession);
//ABD.
//...
pMsg->GetContent(pParamName);
rc = HXR_FAIL; //(p. 1)
if (pParamName != NULL)
{
//Check if this request is for ABD.
if (strncmp( (const char*)pParamName->GetBuffer(), "ABD", 3) == 0)
{
bABDRequest = TRUE;
}
HX_RELEASE(pParamName);
}
if ( (!m_bSendBWPackets) || (ABD_GET_PARAM_RECEIVED == pSession->m_ABDState))
{
if (bABDRequest) rc = HXR_FAIL; //Multiple requests for ABD in one session not allowed.
// we send 451 response (p. 2)
}
else
{
//...
}
if (rc == HXR_OK) //(pt. 3)
{
//...
SendResponse(200);
}
else
{
SendResponse(451);
}
HX_RELEASE(pBuffer);
HX_RELEASE(pMsg);
return HXR_OK;
}
My point is, shouldn't it be rc = HXR_OK on (pt. 1)? Because between (pt. 2) and (pt. 3) there is no other assignment for rc; therefore, rc can never equal HXR_OK and '451' always gets sent. Sorry for the heavy truncating, I guess you can quickly check this.
Any thoughts?
Cheers,
JA
-------------- next part --------------
? server.diff
Index: protocol/rtsp/crtspbase.cpp
===================================================================
RCS file: /cvsroot/server/protocol/rtsp/crtspbase.cpp,v
retrieving revision 1.20.2.25.2.5
diff -u -w -r1.20.2.25.2.5 crtspbase.cpp
--- protocol/rtsp/crtspbase.cpp 17 Oct 2008 23:47:47 -0000 1.20.2.25.2.5
+++ protocol/rtsp/crtspbase.cpp 6 Nov 2008 22:26:28 -0000
@@ -2378,7 +2378,7 @@
HXBOOL bABDRequest = FALSE;
pMsg->GetContent(pParamName);
- rc = HXR_FAIL;
+ rc = HXR_OK;
if (pParamName != NULL)
{
//Check if this request is for ABD.