<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: [Live-devel] Race condition bug
fix</title></head><body>
<blockquote type="cite" cite><font face="Arial" size="-1"
color="#000080">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.</font></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1"
color="#000080"> </font></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1"
color="#000080">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.</font></blockquote>
<div><br></div>
<div>That's because the first request must not have ended correctly -
i.e., with <cr><lf><cr><lf></div>
<div><br></div>
<blockquote type="cite" cite><font face="Arial" size="-1"
color="#000080"> 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).</font></blockquote>
<div><br></div>
<div>Ditto. I suspect that the first request is not well-formed,
so the server is not recognizing when it's ending.</div>
<div><br></div>
<div>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 :-)</div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
http://www.live555.com/</div>
</body>
</html>