cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: RTSP unit tests, and some bugfixes

From: Chris Conroy <Chris.Conroy_at_hillcrestlabs.com>
Date: Thu, 28 Jan 2010 12:26:49 -0500

On Thu, 2010-01-28 at 10:09 +0100, Yang Tse wrote:
> 2010/1/28, Chris Conroy wrote:
>
> > The attached patch includes test suite support for RTSP. (Tests
> > 567-571). All of the RTSP tests are implemented in C on the client side
> > since RTSP is not (and probably won't ever be able to be) part of the
> > cURL command line.
>
> Test cases committed to CVS., modified #568 to avoid need for
> test568.sdp, disabled all for now until the test harness is updated in
> CVS.
>
> > Along the way, I fixed a couple of things
>
> Bug fixes also committed to CVS.

Minor addendum to the excess read stuff. Both the pipelined and
non-pipelined case need to check for excess > 0 && !k->ignorebody.

Index: lib/transfer.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/transfer.c,v
retrieving revision 1.454
diff -r1.454 transfer.c
619c619
< (k->bytecount + nread >= k->maxdownload)) {

---
>           (k->bytecount + nread >= k->maxdownload)) {
622,625c622,625
<         if(conn->data->multi &&
Curl_multi_canPipeline(conn->data->multi)) {
<           /* The 'excess' amount below can't be more than BUFSIZE
which
<              always will fit in a size_t */
<           if(excess > 0 && !k->ignorebody) {
---
>         if(excess > 0 && !k->ignorebody) {
>           if(conn->data->multi &&
Curl_multi_canPipeline(conn->data->multi)) {
>             /* The 'excess' amount below can't be more than BUFSIZE
which
>                always will fit in a size_t */
627,632c627,632
<                   "Rewinding stream by : %zu"
<                   " bytes on url %s (size = %" FORMAT_OFF_T
<                   ", maxdownload = %" FORMAT_OFF_T
<                   ", bytecount = %" FORMAT_OFF_T ", nread = %zd)\n",
<                   excess, data->state.path,
<                   k->size, k->maxdownload, k->bytecount, nread);
---
>                 "Rewinding stream by : %zu"
>                 " bytes on url %s (size = %" FORMAT_OFF_T
>                 ", maxdownload = %" FORMAT_OFF_T
>                 ", bytecount = %" FORMAT_OFF_T ", nread = %zd)\n",
>                 excess, data->state.path,
>                 k->size, k->maxdownload, k->bytecount, nread);
635,637c635,636
<         }
<         else {
<           infof(data,
---
>           else {
>             infof(data,
643a643
>           }
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-28