summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2013-06-07 18:56:57 +0400
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-07 18:06:13 +0200
commit58365228b3181ed03188fc8ff56007ea22678bb5 (patch)
treecb97267b29c1b323bcbc30803f47afe4c5682d37
parent2bcac223e64599eb74889975053f6547000b13cb (diff)
downloadqtserialport-58365228b3181ed03188fc8ff56007ea22678bb5.tar.gz
Windows: Fix no longer receive data after EV_TXEMPTY triggered for CDC ACM devicev5.1.0-rc2v5.1.0-rc1v5.1.0
A previous patch * SHA1 ID: 2bcac223e64599eb74889975053f6547000b13cb introduced a regression: after triggering of EV_TXEMPTY a reception of data is stopped. The reason for this was an immediate return from the handler processCompletionRoutine(). The solution - do not do an immediate return and let to call method startAsyncRead(). Thanks to Dan Task-number: QTPLAYGROUND-22 Change-Id: I1a6b358e6bbaba94527dc9db98a2ab046a8c6f05 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
-rw-r--r--src/serialport/qserialport_win.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/serialport/qserialport_win.cpp b/src/serialport/qserialport_win.cpp
index 1be0991..e8d4d62 100644
--- a/src/serialport/qserialport_win.cpp
+++ b/src/serialport/qserialport_win.cpp
@@ -152,10 +152,8 @@ public:
// Workaround for standard CDC ACM serial ports, for which triggered an
// unexpected event EV_TXEMPTY at data transmission.
if ((originalEventMask & triggeredEventMask) == 0) {
- if (triggeredEventMask == EV_TXEMPTY) // it is not error
- return true;
-
- error = true;
+ if ((triggeredEventMask & EV_TXEMPTY) == 0)
+ error = true;
}
// Start processing a caught error.