diff options
author | Janne Anttila <janne.anttila@digia.com> | 2010-05-19 11:04:09 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2010-05-21 11:24:19 (GMT) |
commit | ddcdae43cf00b49522418c2ae65022de14186ef7 (patch) | |
tree | 8d28bfb14a26113c358ca6ed1e02dfafedf68bba | |
parent | 7afeed5e37c172a2a60b2d4610207243d238b0cb (diff) | |
download | Qt-ddcdae43cf00b49522418c2ae65022de14186ef7.zip Qt-ddcdae43cf00b49522418c2ae65022de14186ef7.tar.gz Qt-ddcdae43cf00b49522418c2ae65022de14186ef7.tar.bz2 |
Removed double EINTR loop from nativeWrite and nativeRead.
qt_safe_write and and qt_safe_read already contain EINTR_LOOP.
It seems that this loop has been added to code due to
merge/clean-up errors in commits:
4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1
f0a8feed9e9b4de10df76faa350201edaef98f1d
Reviewed-by: Aleksandar Sasha Babic
Reviewed-by: Markus Goetz
-rw-r--r-- | src/network/socket/qnativesocketengine_unix.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index 354c944..6550a50 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -848,11 +848,7 @@ qint64 QNativeSocketEnginePrivate::nativeWrite(const char *data, qint64 len) // Symbian does not support signals natively and Open C returns EINTR when moving to offline writtenBytes = ::write(socketDescriptor, data, len); #else - // loop while ::write() returns -1 and errno == EINTR, in case - // of an interrupting signal. - do { - writtenBytes = qt_safe_write(socketDescriptor, data, len); - } while (writtenBytes < 0 && errno == EINTR); + writtenBytes = qt_safe_write(socketDescriptor, data, len); #endif if (writtenBytes < 0) { @@ -896,9 +892,7 @@ qint64 QNativeSocketEnginePrivate::nativeRead(char *data, qint64 maxSize) #ifdef Q_OS_SYMBIAN r = ::read(socketDescriptor, data, maxSize); #else - do { - r = qt_safe_read(socketDescriptor, data, maxSize); - } while (r == -1 && errno == EINTR); + r = qt_safe_read(socketDescriptor, data, maxSize); #endif if (r < 0) { |