aboutsummaryrefslogtreecommitdiff
path: root/lib/base
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base')
-rw-r--r--lib/base/buffer.cpp5
-rw-r--r--lib/base/eerror.cpp7
-rw-r--r--lib/base/encoding.cpp1
-rw-r--r--lib/base/estring.cpp5
-rw-r--r--lib/base/filepush.cpp8
5 files changed, 17 insertions, 9 deletions
diff --git a/lib/base/buffer.cpp b/lib/base/buffer.cpp
index 3a0a6a3d..5dfdfad5 100644
--- a/lib/base/buffer.cpp
+++ b/lib/base/buffer.cpp
@@ -1,8 +1,9 @@
#include <lib/base/buffer.h>
#include <lib/base/eerror.h>
-#include <stdio.h>
+#include <cerrno>
+#include <cstdio>
+#include <cstring>
#include <unistd.h>
-#include <errno.h>
void eIOBuffer::removeblock()
{
diff --git a/lib/base/eerror.cpp b/lib/base/eerror.cpp
index 4c4d6551..35e46e05 100644
--- a/lib/base/eerror.cpp
+++ b/lib/base/eerror.cpp
@@ -1,8 +1,9 @@
#include <lib/base/eerror.h>
#include <lib/base/elock.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdarg>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <unistd.h>
#include <string>
diff --git a/lib/base/encoding.cpp b/lib/base/encoding.cpp
index 5d6617d9..45fea102 100644
--- a/lib/base/encoding.cpp
+++ b/lib/base/encoding.cpp
@@ -1,3 +1,4 @@
+#include <cstdlib>
#include <lib/base/encoding.h>
#include <lib/base/eerror.h>
diff --git a/lib/base/estring.cpp b/lib/base/estring.cpp
index f1d50ccc..dcba7705 100644
--- a/lib/base/estring.cpp
+++ b/lib/base/estring.cpp
@@ -1,6 +1,7 @@
+#include <algorithm>
+#include <cctype>
+#include <climits>
#include <string>
-#include <ctype.h>
-#include <limits.h>
#include <lib/base/eerror.h>
#include <lib/base/encoding.h>
#include <lib/base/estring.h>
diff --git a/lib/base/filepush.cpp b/lib/base/filepush.cpp
index 1999707f..ed2a2185 100644
--- a/lib/base/filepush.cpp
+++ b/lib/base/filepush.cpp
@@ -189,9 +189,13 @@ void eFilePushThread::thread()
if (m_send_pvr_commit && !already_empty)
{
eDebug("sending PVR commit");
+
+ struct pollfd pfd[1] = {m_fd_dest, POLLHUP};
+ poll(pfd, 1, 10000);
+ sleep(5); /* HACK to allow ES buffer to drain */
already_empty = 1;
- if (::ioctl(m_fd_dest, PVR_COMMIT) < 0 && errno == EINTR)
- continue;
+// if (::ioctl(m_fd_dest, PVR_COMMIT) < 0 && errno == EINTR)
+// continue;
eDebug("commit done");
/* well check again */
continue;