debug message for errors in reading the file
git-svn-id: https://svn.musicpd.org/mpd/trunk@1862 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
cc38f07983
commit
fdd4038fcb
@ -18,7 +18,10 @@
|
||||
|
||||
#include "inputStream_file.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
@ -71,6 +74,8 @@ size_t inputStream_fileRead(InputStream * inStream, void * ptr, size_t size,
|
||||
readSize = fread(ptr,size,nmemb,(FILE *)inStream->data);
|
||||
if(readSize <=0 && ferror((FILE *)inStream->data)) {
|
||||
inStream->error = errno;
|
||||
DEBUG("inputStream_fileRead: error reading: %s",
|
||||
strerror(inStream->error));
|
||||
}
|
||||
|
||||
inStream->offset = ftell((FILE *)inStream->data);
|
||||
|
Loading…
Reference in New Issue
Block a user