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
This commit is contained in:
Warren Dukes 2004-06-09 18:28:18 +00:00
parent bfaf6cbd9d
commit 051cfc228d

View File

@ -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);