qt5base-lts/tests/auto
Alex Trotsenko 378e26dd14 QUdpSocket: avoid infinite read notifier blocking
There was a small amount of time between the last readDatagram() call
and disabling a read notifier in case the socket had a pending
datagram. If a new datagram arrived in this period, this qualified as
absence of a datagram reader. Do not change the read notifier state
because it is disabled on canReadNotification() entry and always enabled
by the datagram reader.

Thanks to Peter Seiderer, who investigated the same: "Querying
hasPendingDatagrams() for enabling/disabling setReadNotificationEnabled()
is racy (a new datagram could arrive after readDatagam() is called and
before hasPendingDatagrams() is checked). But for unbuffered sockets the
ReadNotification is already disabled before the readReady signal is
emitted and should be re-enabled when calling read() or readDatagram()
from the user."

However, this patch does not completely solve the problem under Windows,
as the socket notifier may emit spurious notifications.

Task-number: QTBUG-46552
Change-Id: If7295d53ae2c788c39e86303502f38135c4d6180
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-10 12:50:58 +00:00
..
android Fix typo in test results report for android 2015-07-28 21:16:19 +00:00
bic/data bic: Add 5.{1,2,3,4}.0 bic data for linux-gcc-amd64 2015-02-14 06:54:20 +00:00
cmake CMake: Fix regression with quoted OPTIONS parameter 2015-03-11 07:31:33 +00:00
compilerwarnings/data Fixed license headers 2015-02-17 18:46:09 +00:00
concurrent Fix build of tests on QNX. 2015-03-14 07:05:34 +00:00
corelib Fix tst_QGuiApplication for embedded platforms using eglfs QPA 2015-09-10 06:29:11 +00:00
dbus Autotest: rename sub tests from "test" to something meaningful 2015-07-18 02:22:40 +00:00
gui Fix tst_QGuiApplication for embedded platforms using eglfs QPA 2015-09-10 06:29:11 +00:00
guiapplauncher Fix path to examples part of tst_GuiAppLauncher 2015-02-13 07:28:15 +00:00
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network QUdpSocket: avoid infinite read notifier blocking 2015-09-10 12:50:58 +00:00
opengl Update copyright headers 2015-02-11 06:49:51 +00:00
other tst_QProcess_and_GuiEventLoop: Added flag QT_NO_PROCESS 2015-09-09 07:15:15 +00:00
printsupport Update copyright headers 2015-02-11 06:49:51 +00:00
shared Update copyright headers 2015-02-11 06:49:51 +00:00
sql fix usage of wince scope 2015-06-05 10:29:10 +00:00
testlib Change how QDebug escapes QStrings in the output 2015-08-06 04:53:38 +00:00
tools Make QDir::relativeFilePath() return "." for a path to itself. 2015-06-24 15:43:58 +00:00
widgets Handle action events in QLineEditIconButton. 2015-08-18 12:47:17 +00:00
xml Update copyright headers 2015-02-11 06:49:51 +00:00
auto.pro fix usage of wince scope 2015-06-05 10:29:10 +00:00
network-settings.h Update copyright headers 2015-02-11 06:49:51 +00:00
qtest-config.h Update copyright headers 2015-02-11 06:49:51 +00:00
test.pl Update copyright headers 2015-02-11 06:49:51 +00:00