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

QNativeSocketEnginePrivate::nativePendingDatagramSize for Symbian doesn't handle error for ioctl in correct way

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.8.0
    • 4.7.0
    • Network: Sockets
    • None

    Description

      QNativeSocketEnginePrivate::nativePendingDatagramSize implementation for Symbian doesn't handle error which can be in calling ioctl function in correct way.
      Upon successful completion, ioctl() shall return a value other than -1 that depends upon the STREAMS device control function.
      In this case the function returns another value that -1.

      But QNativeSocketEngine::pendingDatagramSize() uses return value to check if socket is valid.
      For Symbian it will not work.
      I suppose that code should be like

          ssize_t recvResult = -1;
          if ( ::ioctl(socketDescriptor, E32IONREAD, (char *) &recvResult) >= 0 )
              return qint64(recvResult-28);
          return qint64(recvResult);
      

      Attachments

        Issue Links

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

          Activity

            People

              earthdomain Earth Domain (Inactive)
              vasyura Oleh Vasyura
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes