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

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

XMLWordPrintable

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

      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);
      

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes