Fix non inheritable socket creation on old windows versions
authorShane Kearns <ext-shane.2.kearns@nokia.com>
Tue, 19 Jun 2012 16:38:40 +0000 (17:38 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 22 Jun 2012 11:43:28 +0000 (13:43 +0200)
commit1655cb5a690895631238b5b7a9a1f0c8ad32fbc4
tree3379e9bd122e0c6bb70f4360fc1f33ff0a8cef80
parent66589cd545e302ca535579f248071f77bc8b261b
Fix non inheritable socket creation on old windows versions

The documentation is misleading, as using the new API actually
causes WSASocket to fail.
New behaviour:
On windows vista or earlier: skip the new API, use old one
On windows 7: try the new API first, if it fails try the old one
On windows 8: try the new API only

The windows 7 behaviour is because we don't know if the service
pack has been installed or not. (And IT departments may have
specifically installed/blocked the hotfix)

Task-number: QTBUG-26224
Change-Id: I6da47959919caee0cd2697f1ae1fca46aa33c1ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mikhail Vorozhtsov
src/network/socket/qnativesocketengine_win.cpp