* [gentoo-commits] gentoo-x86 commit in dev-libs/libcec/files: libcec-1.8.1-eintr-retry.patch
@ 2012-08-25 18:33 Ian Whyman (thev00d00)
0 siblings, 0 replies; only message in thread
From: Ian Whyman (thev00d00) @ 2012-08-25 18:33 UTC (permalink / raw
To: gentoo-commits
thev00d00 12/08/25 18:33:11
Added: libcec-1.8.1-eintr-retry.patch
Log:
Add patch to fix eintr handling
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)
Revision Changes Path
1.1 dev-libs/libcec/files/libcec-1.8.1-eintr-retry.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libcec/files/libcec-1.8.1-eintr-retry.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libcec/files/libcec-1.8.1-eintr-retry.patch?rev=1.1&content-type=text/plain
Index: libcec-1.8.1-eintr-retry.patch
===================================================================
From 8f6c59829bb84edc66ce0edb0a4d5b7335a941c6 Mon Sep 17 00:00:00 2001
From: Josef Fruehwirth <fruehwirth@gmail.com>
Date: Sat, 18 Aug 2012 14:07:04 +0200
Subject: [PATCH] Retry m_port->Read(..) if an EINTR errror occurs instead of
closing the connection.
---
src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.cpp b/src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.cpp
index 70e45ac..3fc05eb 100644
--- a/src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.cpp
+++ b/src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.cpp
@@ -393,7 +393,11 @@ bool CUSBCECAdapterCommunication::ReadFromDevice(uint32_t iTimeout, size_t iSize
if (!IsOpen())
return false;
- iBytesRead = m_port->Read(buff, sizeof(uint8_t) * iSize, iTimeout);
+ do {
+ /* retry Read() if it was interrupted */
+ iBytesRead = m_port->Read(buff, sizeof(uint8_t) * iSize, iTimeout);
+ } while(m_port->GetErrorNumber() == EINTR);
+
if (m_port->GetErrorNumber())
{
--
1.7.10
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-25 18:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-25 18:33 [gentoo-commits] gentoo-x86 commit in dev-libs/libcec/files: libcec-1.8.1-eintr-retry.patch Ian Whyman (thev00d00)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox