aboutsummaryrefslogtreecommitdiff
path: root/lib/base/filepush.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-03-17 13:45:08 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-03-17 13:45:08 +0000
commita7cfb0cd7b847b559309202f7c06fe1f8f3117b5 (patch)
tree4baf56cdbe7874f2b27ab085b79efab7f0285b52 /lib/base/filepush.cpp
parent40d11af2de7aed77c90970ba2b61dd754a225117 (diff)
downloadenigma2-a7cfb0cd7b847b559309202f7c06fe1f8f3117b5.tar.gz
enigma2-a7cfb0cd7b847b559309202f7c06fe1f8f3117b5.zip
fix error handling (errno checking)
Diffstat (limited to 'lib/base/filepush.cpp')
-rw-r--r--lib/base/filepush.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/base/filepush.cpp b/lib/base/filepush.cpp
index 0f41b391..4bc52050 100644
--- a/lib/base/filepush.cpp
+++ b/lib/base/filepush.cpp
@@ -54,15 +54,14 @@ void eFilePushThread::thread()
// eDebug("wrote %d bytes", w);
if (w <= 0)
{
- if (errno == -EINTR)
+ if (errno == EINTR)
continue;
break;
// ... we would stop the thread
}
- /* this should flush all written pages to disk. */
posix_fadvise(m_fd_dest, dest_pos, w, POSIX_FADV_DONTNEED);
-
+
dest_pos += w;
written_since_last_sync += w;
@@ -119,7 +118,7 @@ void eFilePushThread::thread()
{
eDebug("sending PVR commit");
already_empty = 1;
- if (::ioctl(m_fd_dest, PVR_COMMIT) == EINTR)
+ if (::ioctl(m_fd_dest, PVR_COMMIT) < 0 && errno == EINTR)
continue;
eDebug("commit done");
/* well check again */