diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-06-09 18:28:18 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-06-09 18:28:18 +0000 |
commit | 051cfc228d89d95cd050daacbf7a73cd259a4a2e (patch) | |
tree | 9349b831acbbc664e75af7cbf6be6adf5432b66b /src | |
parent | bfaf6cbd9d3c39d466179be9fad0654cc75a4765 (diff) | |
download | mpd-051cfc228d89d95cd050daacbf7a73cd259a4a2e.tar.gz mpd-051cfc228d89d95cd050daacbf7a73cd259a4a2e.tar.xz mpd-051cfc228d89d95cd050daacbf7a73cd259a4a2e.zip |
fix bug where inputStream_httpRead was returning 0 when cnnection closed,
but data is still left in the buffer
git-svn-id: https://svn.musicpd.org/mpd/trunk@1425 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/inputStream_http.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/inputStream_http.c b/src/inputStream_http.c index 51e562c01..1bfec0caa 100644 --- a/src/inputStream_http.c +++ b/src/inputStream_http.c @@ -490,14 +490,15 @@ size_t inputStream_httpRead(InputStream * inStream, void * ptr, size_t size, switch(data->connState) { case HTTP_CONN_STATE_OPEN: + if(data->prebuffer || data->buflen < data->icyMetaint) return 0; + + break; case HTTP_CONN_STATE_CLOSED: - break; + if(data->buflen) break; default: return 0; } - if(data->prebuffer || data->buflen < data->icyMetaint) return 0; - if(data->icyMetaint > 0) { if(data->icyOffset >= data->icyMetaint) { int metalen = *(data->buffer); |