aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-01-29 01:16:23 +0000
committerYang Tse <yangsita@gmail.com>2010-01-29 01:16:23 +0000
commitfce02e1cab4e1010f1eaa905ac396f950f49aee6 (patch)
tree082fd05721e94fd7e277837039ba2bd3f84a56e5 /lib
parent15ddc1f1347ec3853cf3d9ed91c137c440fed35a (diff)
RTSP followup fix. Both the pipelined and non-pipelined case need to
check for (excess > 0 && !k->ignorebody).
Diffstat (limited to 'lib')
-rw-r--r--lib/transfer.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index bf52044a0..ee80f47e6 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -619,28 +619,28 @@ static CURLcode readwrite_data(struct SessionHandle *data,
(k->bytecount + nread >= k->maxdownload)) {
excess = (size_t)(k->bytecount + nread - k->maxdownload);
- 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 */
infof(data,
- "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);
read_rewind(conn, excess);
}
- }
- else {
- infof(data,
+ else {
+ infof(data,
"Excess found in a non pipelined read:"
" excess = %zu"
", size = %" FORMAT_OFF_T
", maxdownload = %" FORMAT_OFF_T
", bytecount = %" FORMAT_OFF_T "\n",
excess, k->size, k->maxdownload, k->bytecount);
+ }
}
nread = (ssize_t) (k->maxdownload - k->bytecount);