aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputStream_file.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-07-13 12:03:21 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-07-13 12:03:21 +0000
commitfdd4038fcba7d559e13af7a494a3c5f497c47769 (patch)
tree55ff815cd4104912a2023ee82c2f6ff8c210e08c /src/inputStream_file.c
parentcc38f07983887a30c2a8c9b6ec7eaffc77ecf121 (diff)
downloadmpd-fdd4038fcba7d559e13af7a494a3c5f497c47769.tar.gz
mpd-fdd4038fcba7d559e13af7a494a3c5f497c47769.tar.xz
mpd-fdd4038fcba7d559e13af7a494a3c5f497c47769.zip
debug message for errors in reading the file
git-svn-id: https://svn.musicpd.org/mpd/trunk@1862 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/inputStream_file.c')
-rw-r--r--src/inputStream_file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/inputStream_file.c b/src/inputStream_file.c
index d1282201f..2e685f2a7 100644
--- a/src/inputStream_file.c
+++ b/src/inputStream_file.c
@@ -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);