Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-26224

Fix for QTBUG-4465 breaks sockets on Windows XP

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • None
    • 5.0.0
    • Network: Sockets
    • None
    • Qt 5 from git (9fe5139e), Windows XP Pro SP3, mingw-w64 (GCC 4.7.1).
    • 1655cb5a690895631238b5b7a9a1f0c8ad32fbc4

    Description

      Commit dbcbd470 forcefully adds the WSA_FLAG_NO_HANDLE_INHERIT flag (QNativeSocketEnginePrivate::createNewSocket), even if it is not supported on the current system. In particular, on Windows XP (SP3) that leads to WSASocket always failing with WSAEPROTOTYPE (QTcpSocket::connectToHost fails immediately with "Protocol type not supported"). I fixed it just by changing
      #ifndef WSA_FLAG_NO_HANDLE_INHERIT
      #define WSA_FLAG_NO_HANDLE_INHERIT 0x80
      #endif
      to
      #ifndef WSA_FLAG_NO_HANDLE_INHERIT
      #define WSA_FLAG_NO_HANDLE_INHERIT 0
      #endif

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            shkearns Shane Kearns
            mikhail.vorozhtsov Mikhail Vorozhtsov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes