From d3505cfb64950b9647507e0bc641999ad3080c87 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 30 Apr 2004 09:38:52 +0000 Subject: - better error messages for the io_helper functions CVS patchset: 6464 CVS date: 2004/04/30 09:38:52 --- src/xine-engine/io_helper.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3