qt6-bb10/src/corelib/kernel
Alex Trotsenko a6ec869211 Fix the spurious socket notifications under Windows
To handle network events, QEventDispatcherWin32 uses I/O model
based on notifications through the window message queue. Having
successfully posted notification of a particular event to an
application window, no further messages for that network event
will be posted to the application window until the application
makes the function call that implicitly re-enables notification
of that network event. With these semantics, an application need
not read all available data in response to an FD_READ message:
a single recv in response to each FD_READ message is appropriate.
If an application issues multiple recv calls in response to a
single FD_READ, it can receive multiple FD_READ messages
(including spurious).

To solve this issue, this patch always disables the notifier
after getting a notification, and re-enables it only when the
message queue is empty.

Task-number: QTBUG-46552
Change-Id: I05df67032911cd1f5927fa7912f7864bfbf8711e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-10 12:51:02 +00:00
..
kernel.pri fix usage of wince scope 2015-06-05 10:29:10 +00:00
qabstracteventdispatcher.cpp Merge remote-tracking branch 'origin/5.4' into 5.5 2015-02-24 21:02:08 +01:00
qabstracteventdispatcher.h Update copyright headers 2015-02-11 06:49:51 +00:00
qabstracteventdispatcher_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qabstractnativeeventfilter.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qabstractnativeeventfilter.h Update copyright headers 2015-02-11 06:49:51 +00:00
qbasictimer.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qbasictimer.h Update copyright headers 2015-02-11 06:49:51 +00:00
qcore_mac.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qcore_mac_objc.mm Fixed license headers 2015-02-17 18:46:09 +00:00
qcore_mac_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qcore_unix.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qcore_unix_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qcoreapplication.cpp QtCore: Fix const correctness in old style casts 2015-07-20 15:54:19 +00:00
qcoreapplication.h qdoc: Remove #ifdef Q_QDOC for uses of QPrivateSignal 2015-04-20 06:25:20 +00:00
qcoreapplication_mac.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qcoreapplication_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qcoreapplication_win.cpp Rework WinRT timer handling 2015-04-20 06:14:07 +00:00
qcorecmdlineargs_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qcoreevent.cpp Merge remote-tracking branch 'origin/5.4' into 5.5 2015-04-15 09:09:24 +02:00
qcoreevent.h Update copyright headers 2015-02-11 06:49:51 +00:00
qcoreglobaldata.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qcoreglobaldata_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qcrashhandler.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qcrashhandler_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qeventdispatcher_blackberry.cpp Merge remote-tracking branch 'origin/5.4' into 5.5 2015-04-15 09:09:24 +02:00
qeventdispatcher_blackberry_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qeventdispatcher_glib.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qeventdispatcher_glib_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qeventdispatcher_unix.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qeventdispatcher_unix_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qeventdispatcher_win.cpp Fix the spurious socket notifications under Windows 2015-09-10 12:51:02 +00:00
qeventdispatcher_win_p.h Fix the spurious socket notifications under Windows 2015-09-10 12:51:02 +00:00
qeventdispatcher_winrt.cpp winrt: don't return invalidated timers in QEventDispatcherWinRT::registeredTimers 2015-06-23 05:47:17 +00:00
qeventdispatcher_winrt_p.h Make the Windows qt_msectime() function return 64-bit 2015-07-08 03:20:19 +00:00
qeventloop.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qeventloop.h Update copyright headers 2015-02-11 06:49:51 +00:00
qeventloop_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qfunctions_nacl.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qfunctions_nacl.h Update copyright headers 2015-02-11 06:49:51 +00:00
qfunctions_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qfunctions_vxworks.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qfunctions_vxworks.h Update copyright headers 2015-02-11 06:49:51 +00:00
qfunctions_wince.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qfunctions_wince.h Update copyright headers 2015-02-11 06:49:51 +00:00
qfunctions_winrt.cpp winrt: Fix non-PCH build 2015-04-01 14:13:30 +00:00
qfunctions_winrt.h WinRT: fix namespaced build 2015-05-16 19:41:13 +00:00
qjni.cpp Merge remote-tracking branch 'origin/5.4' into 5.5 2015-06-01 17:46:58 +02:00
qjni_p.h Merge remote-tracking branch 'origin/5.4' into 5.5 2015-06-01 17:46:58 +02:00
qjnihelpers.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qjnihelpers_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qjnionload.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qmath.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qmath.h Use C++ <cmath> instead of <math.h> 2015-02-16 16:21:15 +00:00
qmath.qdoc Merge remote-tracking branch 'origin/5.4' into 5.5 2015-03-31 10:03:31 +02:00
qmetaobject.cpp Doc: Corrected link issues in qtbase 2015-09-04 08:41:18 +00:00
qmetaobject.h Update copyright headers 2015-02-11 06:49:51 +00:00
qmetaobject_moc_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qmetaobject_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qmetaobjectbuilder.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qmetaobjectbuilder_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qmetatype.cpp Doc:added doc to undocumented functions 2015-07-22 13:47:23 +00:00
qmetatype.h QMetaType: Fix compilation with non default constructible Q_GADGET 2015-05-27 10:51:10 +00:00
qmetatype_p.h Make QPersistentModelIndex an internal meta-type 2015-03-06 07:07:39 +00:00
qmetatypeswitcher_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qmimedata.cpp Add support to set text/uri-list mimedata via setData() 2015-04-28 12:46:35 +00:00
qmimedata.h Update copyright headers 2015-02-11 06:49:51 +00:00
qobject.cpp Doc: add clarification about signals not being buffered when blocked 2015-08-06 20:49:44 +00:00
qobject.h qdoc: Remove #ifdef Q_QDOC for uses of QPrivateSignal 2015-04-20 06:25:20 +00:00
qobject_impl.h Update copyright headers 2015-02-11 06:49:51 +00:00
qobject_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qobjectcleanuphandler.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qobjectcleanuphandler.h Update copyright headers 2015-02-11 06:49:51 +00:00
qobjectdefs.h Make QMetaObject::Connection check its state deeply 2015-06-19 23:22:33 +00:00
qobjectdefs_impl.h Make Creator happy with qobjectdefs_impl.h parsing 2015-03-31 07:05:47 +00:00
qpointer.cpp Merge remote-tracking branch 'origin/5.4' into 5.5 2015-02-24 21:02:08 +01:00
qpointer.h Update copyright headers 2015-02-11 06:49:51 +00:00
qppsattribute.cpp Merge remote-tracking branch 'origin/5.4' into 5.5 2015-04-15 09:09:24 +02:00
qppsattribute_p.h Merge remote-tracking branch 'origin/5.4' into 5.5 2015-04-15 09:09:24 +02:00
qppsattributeprivate_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qppsobject.cpp Merge remote-tracking branch 'origin/5.4' into 5.5 2015-04-15 09:09:24 +02:00
qppsobject_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qppsobjectprivate_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qsharedmemory.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qsharedmemory.h Update copyright headers 2015-02-11 06:49:51 +00:00
qsharedmemory_android.cpp Windows: Don't cause a malloc before calling GetLastError() 2015-03-16 18:13:24 +00:00
qsharedmemory_p.h Windows: Don't cause a malloc before calling GetLastError() 2015-03-16 18:13:24 +00:00
qsharedmemory_posix.cpp Windows: Don't cause a malloc before calling GetLastError() 2015-03-16 18:13:24 +00:00
qsharedmemory_systemv.cpp Windows: Don't cause a malloc before calling GetLastError() 2015-03-16 18:13:24 +00:00
qsharedmemory_unix.cpp Windows: Don't cause a malloc before calling GetLastError() 2015-03-16 18:13:24 +00:00
qsharedmemory_win.cpp WinRT: Fix warnings for Windows Phone 2015-05-19 11:18:18 +00:00
qsignalmapper.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qsignalmapper.h Update copyright headers 2015-02-11 06:49:51 +00:00
qsocketnotifier.cpp Fix the spurious socket notifications under Windows 2015-09-10 12:51:02 +00:00
qsocketnotifier.h qdoc: Remove #ifdef Q_QDOC for uses of QPrivateSignal 2015-04-20 06:25:20 +00:00
qsystemerror.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qsystemerror_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qsystemsemaphore.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qsystemsemaphore.h Update copyright headers 2015-02-11 06:49:51 +00:00
qsystemsemaphore_android.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qsystemsemaphore_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qsystemsemaphore_posix.cpp Fix QT_POSIX_IPC support 2015-02-25 11:42:36 +00:00
qsystemsemaphore_systemv.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qsystemsemaphore_unix.cpp Fix QT_POSIX_IPC support 2015-02-25 11:42:36 +00:00
qsystemsemaphore_win.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qtcore_eval.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qtimer.cpp Merge remote-tracking branch 'origin/5.4' into 5.5 2015-02-24 21:02:08 +01:00
qtimer.h qdoc: Remove #ifdef Q_QDOC for uses of QPrivateSignal 2015-04-20 06:25:20 +00:00
qtimerinfo_unix.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qtimerinfo_unix_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qtranslator.cpp Doc: Don't advertise QLocale::system() in QTranslator::load documentation 2015-07-23 10:50:32 +00:00
qtranslator.h Update copyright headers 2015-02-11 06:49:51 +00:00
qtranslator_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qvariant.cpp QVariant: Fix wrong return type in toPersistentModelIndex() 2015-03-12 21:33:55 +00:00
qvariant.h QVariant: Fix wrong return type in toPersistentModelIndex() 2015-03-12 21:33:55 +00:00
qvariant_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qwineventnotifier.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qwineventnotifier.h qdoc: Remove #ifdef Q_QDOC for uses of QPrivateSignal 2015-04-20 06:25:20 +00:00