summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@users.sourceforge.net>2004-04-30 09:38:52 +0000
committerBastien Nocera <hadess@users.sourceforge.net>2004-04-30 09:38:52 +0000
commitd3505cfb64950b9647507e0bc641999ad3080c87 (patch)
tree3e52bfbb8a5d6bb28930a6111dd01632e54cfd20
parent5f1d7f376a9389193ee6903feda319d17ab78171 (diff)
downloadxine-lib-d3505cfb64950b9647507e0bc641999ad3080c87.tar.gz
xine-lib-d3505cfb64950b9647507e0bc641999ad3080c87.tar.bz2
- better error messages for the io_helper functions
CVS patchset: 6464 CVS date: 2004/04/30 09:38:52
-rw-r--r--src/xine-engine/io_helper.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/xine-engine/io_helper.c b/src/xine-engine/io_helper.c
index 0d23752ae..78e68d815 100644
--- a/src/xine-engine/io_helper.c
+++ b/src/xine-engine/io_helper.c
@@ -312,7 +312,22 @@ static off_t xio_rw_abort(xine_stream_t *stream, int fd, int cmd, char *buf, off
#ifndef WIN32
if (errno == EAGAIN)
continue;
- perror("io_helper: I/O error");
+
+ if (errno == EACCES) {
+ _x_message(stream, XINE_MSG_PERMISSION_ERROR, NULL, NULL);
+ xine_log (stream->xine, XINE_LOG_MSG,
+ _("io_helper: Permission denied\n"));
+ } else if (errno == ENOENT) {
+ _x_message(stream, XINE_MSG_FILE_NOT_FOUND, NULL, NULL);
+ xine_log (stream->xine, XINE_LOG_MSG,
+ _("io_helper: File not found\n"));
+ } else if (errno == ECONNREFUSED) {
+ _x_message(stream, XINE_MSG_CONNECTION_REFUSED, NULL, NULL);
+ xine_log (stream->xine, XINE_LOG_MSG,
+ _("io_helper: Connection Refused\n"));
+ } else {
+ perror("io_helper: I/O error");
+ }
#else
if (WSAGetLastError() == WSAEWOULDBLOCK)
continue;