Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-12787

WSPSocket directly returns error codes

    XMLWordPrintable

Details

    Description

      WSASocketW does the following after calling WSPSocket:

      569        /* Check if we got a valid socket */
      570        if (Status == WSAEINVAL)
      571        {
      572            Status = INVALID_SOCKET;
      573            ErrorCode = WSAEINVAL;
      574        }

      This is a huge hack. WSPSocket should just properly return a socket or INVALID_SOCKET, and set lpErrno.

      (in fact this code block is even duplicated – which is why Coverity complained about it in CID 1400935)

      Attachments

        1. socket-error.patch
          5 kB
          ThFabba
        2. socket-error.patch
          5 kB
          ThFabba

        Activity

          People

            ThFabba ThFabba
            ThFabba ThFabba
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: