summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qnativesocketengine_win.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix for a native socket engine on WindowsTimur Pocheptsov2015-11-161-0/+7
| | | | | | | | | | | | | | | nativeConnect calls WSAConnect, tests its return value and then in case of SOCKET_ERROR checks WSAGetLastError and calls getsockopt to extract SO_ERROR. While MSDN says that getsockopt should clear the error, it's not true and this error can later affect in some weird way the next WSAConnect attempt/or nativeConnect's logic. Found in tst_qtcpsocket::bindThenResolveHost failing in this scenario: QHostInfo has a list of invalid/valid addresses, and as a result test doing strange things in waitForConnected and failing (and sometimes passing). Task-number: QTBUG-49255 Change-Id: I71f771647f305d8ca327d25ac7382a2edab96d17 Reviewed-by: Richard J. Moore <rich@kde.org>
* Add QNetworkInterface::interface{IndexFromName,NameFromIndex}Thiago Macieira2015-10-151-6/+0
| | | | | | | | | | These are for faster lookups between ID and name when one doesn't need the full information set about the interface. Change-Id: I7de033f80b0e4431b7f1ffff13f98d448a705c3e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-16/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| * Windows socket engine: do not discard datagram on critical failureAlex Trotsenko2015-09-101-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some network conditions, WSARecvFrom() may return WSAECONNRESET or WSAENETRESET error code to indicate that the connection has been broken and should be reset. According to MSDN documentation, WSAECONNRESET mean that the virtual circuit was reset by the remote side executing a hard or abortive close. Also, it would indicate that a previous send operation resulted in an ICMP "Port Unreachable" message. For a datagram socket, WSAENETRESET indicates that the time to live has expired. Previously, hasPendingDatagram() discarded datagrams with these errors and reported no data available. This behavior is incorrect and can lead to infinite "freezing" of the socket. This patch allows to handle these notifications as a result of the readDatagram() call. Task-number: QTBUG-46552 Change-Id: I7d84babe22d36736b928b4dd4841e30be53d16bd Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Remove vestiges of Qt's own sockaddr_in6 and sockaddr_storageThiago Macieira2015-08-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We weren't using qt_sockaddr_storage, so it's not a problem. But since we're not using it anyway, we don't really need it. The storage is only needed if we needed to get a bigger socket address and that only happens with Unix sockets (paths). sockaddr_in6, however, was just wrong. Some systems derived from BSD, like OS X, have a sXX_len field containing the length of the socket address structure and our qt_sockaddr_in6 was missing sin6_len. As a result, setting sin6_family was just plain wrong on little-endian systems. Like all modern systems running BSDs and OS X... Change-Id: I7de033f80b0e4431b7f1ffff13f900f004c55443 Reviewed-by: Richard J. Moore <rich@kde.org>
* | QNativeSocketEngine Unix: do the same as for WindowsThiago Macieira2015-08-221-26/+6
| | | | | | | | | | Change-Id: Iee8cbc07c4434ce9b560ffff13ca9d9858cf7111 Reviewed-by: Richard J. Moore <rich@kde.org>
* | QNativeSocketEngine Windows: bring bind() in line with UnixThiago Macieira2015-08-221-25/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IPv4+IPv6 dual stack code that has been in Qt since 5.0 has been giving test failures for tst_qudpsocket: some binds that shouldn't succeed do succeed. Instead, copy the core code from the Unix version so the two OSes will behave the same way. The one difference in behavior between Windows and Unix is that on Unix you can bind an IPv4 address to a multicast IP and on Windows you can't. So I left the "correction" that was in the original code, but I'm unsure if it is the right thing to do. Are people expecting to join the multicast group this way? Change-Id: Iee8cbc07c4434ce9b560ffff13caa1c3d5a7e8fd Reviewed-by: Richard J. Moore <rich@kde.org>
* | QNativeSocketEngine Windows: simplify the conversion to struct sockaddrThiago Macieira2015-08-221-33/+19
| | | | | | | | | | | | | | | | We have qt_sockaddr, which has enough storage for our needs and is a union of all the types. We don't need them to be separate like that. Change-Id: Iee8cbc07c4434ce9b560ffff13ca9cb960ccf1d7 Reviewed-by: Richard J. Moore <rich@kde.org>
* | QNativeSocketEngine: add code to send extra IP header dataThiago Macieira2015-08-221-0/+58
| | | | | | | | | | Change-Id: Iee8cbc07c4434ce9b560ffff13ca48c053bd88ed Reviewed-by: Richard J. Moore <rich@kde.org>
* | QNativeSocketEngine: add code to receive IP header dataThiago Macieira2015-08-221-0/+58
| | | | | | | | | | | | | | Change-Id: Iee8cbc07c4434ce9b560ffff13ca466263abcb1b Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* | QNativeSocketEngine: use sendmsg/recvmsg instead of sendto/recvfromThiago Macieira2015-08-221-27/+55
| | | | | | | | | | | | | | | | | | | | | | | | We'll need to use these functions instead of the ones we're currently using in order to access the ancillary data. Note that on Windows the two functions aren't globals, but must be obtained via ioctl, which means they can fail. If they do, we fall back to using WSARecvFrom/WSASendTo Change-Id: Iee8cbc07c4434ce9b560ffff13ca4284acd24132 Reviewed-by: Richard J. Moore <rich@kde.org>
* | QAbstractSocketEngine: introduce QIpPacketHeader for datagramsThiago Macieira2015-08-221-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the readDatagram() and writeDatagram() virtual functions to take a QIpPacketHeader as meta data, instead of a QHostAddress/quint16 pair. As previously, the header is an "out" parameter for readDatagram() and an "in" parameter for writeDatagram(). The header pointer in readDatagram() is allowed to be null if the PacketHeaderOptions indicates WantNone. Otherwise, it must not be null. The extra options parameter is introduced because we may not always want all the metadata upon reception. For sending, we know what to include or not based on what's set in the incoming header parameter. QIpPacketHeader splits sender and destination because we'll be able to return both on datagram reception. Change-Id: Iee8cbc07c4434ce9b560ffff13ca4213255008c7 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Merge the multiple implementations of getting the local hostnameThiago Macieira2015-08-131-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit moves the functionality from QtNetwork's QHostInfo to QtCore. Note that due to Windows ws2_32.dll's quirky behavior of requiring WSAStartup before calling gethostname, this change required moving the initialization to QtCore too. On Linux systems, gethostname() gets the name from uname(), so we bypass the middle man and save one memcpy. Change-Id: I27eaacb532114dd188c4ffff13d32655a6301346 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Set the socketType and socketProtocol earlyThiago Macieira2015-08-101-0/+4
|/ | | | | | | | | | The type is known (usually) right after createNewSocket, so let's just set it. They may get overwritten later (in fetchConnectionParameters), but this allows early use of setOption when we need to know the socket type. Change-Id: Iee8cbc07c4434ce9b560ffff13ca09fccb8e1662 Reviewed-by: Richard J. Moore <rich@kde.org>
* QNativeSocketEngine: merge the get/setsockopt level constantsThiago Macieira2015-03-151-95/+70
| | | | | | | No point in having them separate, as that's a recipe for mistakes. Change-Id: Iee8cbc07c4434ce9b560ffff13ca4132cd1879ed Reviewed-by: Richard J. Moore <rich@kde.org>
* IPv6 scope IDs are unsignedThiago Macieira2015-03-141-1/+1
| | | | | | | | We need to make sure that a large scope ID saved in a QString does get converted properly back to an integer. Change-Id: Iee8cbc07c4434ce9b560ffff13c9bd0e9008bd9c Reviewed-by: Richard J. Moore <rich@kde.org>
* Make sure we also treat QAbstractSocket::AnyIPProtocol as IPv6Thiago Macieira2015-03-121-7/+7
| | | | | | | | | | | The native socket engine sets the socketProtocol to that when it means it's using IPv6 with v4 compatibility on (v6only = false). We mustn't have faced problems so far because the multicast tests set don't test v6only = false. Change-Id: Iee8cbc07c4434ce9b560ffff13ca0aff60673940 Reviewed-by: Richard J. Moore <rich@kde.org>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-1/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * Save two system calls for setting a socket non-blocking on LinuxThiago Macieira2015-02-151-1/+8
| | | | | | | | | | | | | | | | Linux's socket(2) system call can take SOCK_NONBLOCK and let us avoid the extra two fcntl(2) to change the setting after it's created. Change-Id: Ie0d7a2d51acc21acd850cbee6d0f76e27b1ae859 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Update copyright headersJani Heikkinen2015-02-111-7/+7
|/ | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Don't unnecessariy set localAddress in QNativeSocketEngine's nativeBindThiago Macieira2015-01-111-3/+0
| | | | | | | | | The outer QNativeSocketEngine::bind() function will call fetchConnectionParameters() as soon as nativeBind() returns, so don't bother copying localAddress. Change-Id: Ice13e507ccb9c575a7d3bdf0b41394f35230b746 Reviewed-by: Richard J. Moore <rich@kde.org>
* Windows native socket: handle WSAENETRESET the same as WSAECONNRESETShawn Rutledge2014-10-221-1/+1
| | | | | | | | Task-number: QTBUG-41934 Change-Id: Ib92d8a83965e11e2706ef0daba945cb00692d2c5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Removing a few unneeded "? true : false"Alessandro Portale2014-10-091-1/+1
| | | | | | | Change-Id: Ib13f0ddd65fe78f5559f343f2fc30756b1d3ef76 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* IPv6 scope ID of zero is not validThiago Macieira2014-05-261-1/+2
| | | | | | | | IANA reserves scope ID of 0x0 to mean "no scope ID", so make sure that we don't try to set it when reading from the sockaddr_in6 structure. Change-Id: I71b207e6f8262ab2bf9fde993288a71ba63c7572 Reviewed-by: Richard J. Moore <rich@kde.org>
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-14/+14
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not use SO_SNDBUF on Vista or laterKurt Pattyn2014-01-031-0/+3
| | | | | | Task-number: QTBUG-30478 Change-Id: I6c41bc8bea21aa00277d8bfce070ea993e2a0f28 Reviewed-by: Richard J. Moore <rich@kde.org>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix socket binding on mingw buildsShane Kearns2013-01-101-14/+8
| | | | | | | | | | | | | | | | The mingw headers lack the IPV6_V6ONLY define, depending where you get them from. Currently the headers provided by mingw-builds are more complete than those from mingw.org itself. I have removed the compile time check, defined the macro if it is undefined, and it should be just a runtime check for if you are running on windows XP you get no dual stack binding. Task-number: QTBUG-28787 Task-number: QTBUG-28971 Task-number: QTBUG-28972 Change-Id: Iafadbb55d367c44ba9f812a24115e65591701b54 Reviewed-by: Ilya Sidorov Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Fix MinGW/gcc warning about NOMINMAX being redefinedKai Koehne2012-09-261-1/+1
| | | | | | | | | Commit 5230d62fe added a #define NOMINMAX, which conflicts with a NOMINMAX definition in the MinGW headers. Just use the same definition as in MinGW to fix the gcc warning. Change-Id: Ib21dd323ebbdca5d143e394c7631303e0c72541a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* If accept fails, stop accepting new connections and emit error signal.Jonas M. Gastal2012-09-261-1/+34
| | | | | | Task-number: QTBUG-24778 Change-Id: I6c5b685b3f861a0fafc1475c41bb35cede17d712 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix sockets for Windows CEAndreas Holzammer2012-08-141-2/+2
| | | | | | | | | Version numbers for CE are higher then for the desktop, so insert a check for this, as the api is not working as for windows 7 and above. Change-Id: I79baba9183e11c714cffd0bb43327c197043d6e0 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QtNetwork: Better detection of connection failures on WindowsMartin Petersson2012-07-301-21/+41
| | | | | | | | | | | | | | | If the error code from WSAConnect is WSAEWOULDBLOCK, then the operation proceeds but the outcome is not known at that time. We then check SO_ERROR's value to detect errors. But if that call returns 0 this could indicate that the value is still not know. In this case we try one more time to increase the chance of getting the correct value. This fixed the tst_QNetworkReply::getFromUnreachableIp auto test on Windows. Change-Id: I25008aca062b2f823e3d93ebb0ae456d7e4a6ecc Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QNativeSocketEngine: remove compile watning on WindowsMartin Petersson2012-07-031-0/+2
| | | | | | | Remove warning of unused variable. Change-Id: Ia361dcb9081cd47c7018f5e75cdb8eb74f5474d4 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* SocketEngine Windows: If not dual stack, use IPv4 for AnyIPProtocolMartin Petersson2012-07-031-0/+3
| | | | | | | | | If the Windows version doesn't support dual stack then we should bind to IPv4. So we should change the socketProtocol to QAbstractSocket::IPv4Protocol as well. Change-Id: I7f9d0bdd861f82d720e347d3fa968198de720d1a Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix non inheritable socket creation on old windows versionsShane Kearns2012-06-221-16/+21
| | | | | | | | | | | | | | | | | | 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
* Partial fix for WebKit compilation on WindowsSimon Hausmann2012-06-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | qdatetime.h uses std::min/max and on Windows windows.h (or some subsequent header file) may under certain circumstances define min/max as macros. The easiest way to prevent the windows header files from doing that is to define NOMINMAX in the place right before windows.h is included. The other way is to define min and max to min/max themselves to prevent windows.h from doing its evil thing. If a user of Qt (WebKit in this case) chooses the approach of defining min/max to themselves and then includes qdatetime.h, then a subsequent inclusion of windows.h doesn't work because qdatetime.h undefines min/max. We should not enforce the type of workaround needed, therefore this patch removes the workaround from qdatetime.h and requires user code that happens to include windows header files before qdatetime.h (seldom case) to choose either workaround. Change-Id: I7347eec7369491a065e894cff557004e069453d5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fallback to IPv4 when IPv6 is not present.Jonas M. Gastal2012-05-211-1/+1
| | | | | | | In tests when IPv6 is not present QSKIP IPv6 tests. Task-number: QTBUG-23660 Change-Id: I02abc7322d765a93cbf661e53c76257f03dca73e Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Make the windows socket handle non inheritableShane Kearns2012-05-181-1/+23
| | | | | | | | | | | | This is for behaviour consistency with Qt on unix, as well as the socket close issues described in the task. Task-number: QTBUG-4465 Change-Id: Ida95650d8a9bd7b5bc3d3926d22e20a6d7eeb30b Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix sending UDP packets to link local addressesShane Kearns2012-05-111-4/+6
| | | | | | | | | | | | When the scope ID is not set, Mac and Windows will not transmit packets to link local addresses. This patch implements setting the scope in the native socket engines and adds a test case. (it was partially implemented already, though UDP specific code paths were missed in the unix engine) Task-number: QTBUG-25634 Change-Id: I23300bdc9856e38458078e913daaa59cd05a74b5 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Allow autobound UDP sockets to send to IPv4 and IPv6Shane Kearns2012-03-221-1/+2
| | | | | | | | | | | | | | | | When writeDatagram is called without first binding the UDP socket, then bind it as QHostAddress::Any. This allows the same socket to be used to sent to both IPv4 and IPv6 destination addresses. Allowing the OS to autobind the socket inside sendTo() may result in a single protocol socket. Task-number: QTBUG-5275 Change-Id: I2b76507e8a8a38369c6eafb61ce4191d1d6cc930 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Windows - fix getsockopt calls for narrower than int optionsShane Kearns2012-03-011-5/+7
| | | | | | | | | | | | | | | | | | | | | | Windows unhelpfully writes to only one byte of the output buffer when getsockopt is called for a boolean option. Therefore we have to zero initialise the int rather than initialising to -1 as was done before. This in general only works for little endian architecture, because the word would look like 0x01000000 on big endian. So I have added some compile time asserts in the assumption that windows is always little endian. This is ok for comparisons with 0/false, but not comparisons with true or nonzero values. In the case of IPV6_V6ONLY, it is documented as DWORD (unsigned int) but on some windows versions it is returned as a boolean triggering the warning. I removed the warning, as the conversion to int works on both LE and BE since it is only compared with zero. Task-number: QTBUG-23488 Change-Id: I3c586d1ada76465fc045a82661f289920c657a4c Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
* Windows - fix connecting to a socket using IPv4 mapped IPv6Shane Kearns2012-02-201-0/+10
| | | | | | | | | | | | Connecting to an IPv4 mapped IPv6 address (e.g. ::FFFF:127.0.0.1) requires the IPV6_V6ONLY socket option to be cleared. This was causing tst_qtcpserver::ipv6ServerMapped autotest to fail. The same change is not required on MacOS X - the test passes there. Task-number: QTBUG-24351 Change-Id: I6c08b19f0daa12765da2d44792ffb17299322695 Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* MinGW: Fix warnings.Friedemann Kleint2012-02-041-0/+2
| | | | | | | | - Special #define to access HB seems no longer necessary (it was causing about mismatching DLL import attributes). Change-Id: I57cc7d57b12a67c1d549b053db81e1f198f87786 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix debug format string in windows socket engineShane Kearns2012-01-301-2/+2
| | | | | | | %l has no meaning, should be %li according to the arguments. Change-Id: Ife9ec524109e021ad723865445e80b6bad51a5c6 Reviewed-by: Richard J. Moore <rich@kde.org>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make socket descriptors qintptr.Jonas M. Gastal2012-01-051-2/+2
| | | | | | | | | | Windows x64 uses 64 bits integer for sockets, to ensure compatibility we should use ptr sized integers for our socket descriptors. Task-number: QTBUG-19004 Change-Id: I4b56023874a4f1bad107c66c054fecfedde33d88 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>