diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-05-27 03:44:45 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-05-27 03:44:45 +0000 |
commit | 1bed575100213d8f283c21158b008db685aca5b0 (patch) | |
tree | 299e68dee632901129c1520db0259f3268f1ee74 | |
parent | a06b86e317e29981ec190b7a1f57b5f1c9e875dc (diff) | |
download | xine-lib-1bed575100213d8f283c21158b008db685aca5b0.tar.gz xine-lib-1bed575100213d8f283c21158b008db685aca5b0.tar.bz2 |
fix receiving the last bytes of a http connection
now .ram files should work again with http
CVS patchset: 6596
CVS date: 2004/05/27 03:44:45
-rw-r--r-- | src/input/input_http.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/input/input_http.c b/src/input/input_http.c index 22ba50a75..17e4748f0 100644 --- a/src/input/input_http.c +++ b/src/input/input_http.c @@ -19,7 +19,7 @@ * * input plugin for http network streams * - * $Id: input_http.c,v 1.89 2004/05/16 14:04:13 tmattern Exp $ + * $Id: input_http.c,v 1.90 2004/05/27 03:44:45 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -393,11 +393,14 @@ static off_t http_plugin_read (input_plugin_t *this_gen, n = nlen - num_bytes; if (n) { - if (http_plugin_read_int (this, &buf[num_bytes], n) != n) - return -1; + int read_bytes; + read_bytes = http_plugin_read_int (this, &buf[num_bytes], n); + + if (read_bytes < 0) + return read_bytes; - num_bytes += n; - this->curpos += n; + num_bytes += read_bytes; + this->curpos += read_bytes; } return num_bytes; |