[Live-devel] Race condition bug fix

Ross Finlayson finlayson at live555.com
Thu Sep 13 12:17:23 PDT 2007


>I agree that in the case of two reads to build a request, my code 
>does not pass the correct length, however there is still a problem. 
>Sorry I did not explain it fully in my original mail.
>
>In our use of the server, the client often makes two requests for a 
>pair of streams from the server. Therefore two requests arrive very 
>closely in time. The second starts processing after the first is 
>read but before resetRequestBuffer() resets the 
>fRequestBytesAlreadySeen.

That's because the first request must not have ended correctly - 
i.e., with <cr><lf><cr><lf>

>  So the second request is added to the end of the first in the 
>fRequestBuffer and parseRTSPRequestString is called with a pointer 
>to the beginning of the buffer (which now has both requests, first 
>then second).

Ditto.  I suspect that the first request is not well-formed, so the 
server is not recognizing when it's ending.

Mostl likely this is because it doesn't end with  <cr><lf><cr><lf>. 
What is your RTSP client?  (If your RTSP client used our software, 
then you wouldn't have this problem :-)
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20070913/e90f014c/attachment.html 


More information about the live-devel mailing list