Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/network/socket/qnativesocketengine_unix.cpp

    r651 r769  
    602602    // well be 0, so we can't check recvfrom's return value.
    603603    ssize_t readBytes;
     604
     605
     606
     607
    604608    do {
    605609        char c;
    606610        readBytes = ::recvfrom(socketDescriptor, &c, 1, MSG_PEEK, &storage.a, &storageSize);
    607611    } while (readBytes == -1 && errno == EINTR);
     612
    608613
    609614    // If there's no error, or if our buffer was too small, there must be a
     
    662667
    663668    ssize_t recvFromResult = 0;
     669
     670
     671
     672
     673
    664674    do {
    665675        char c;
     
    667677                                    0, &aa.a, &sz);
    668678    } while (recvFromResult == -1 && errno == EINTR);
     679
    669680
    670681    if (recvFromResult == -1) {
     
    833844    qt_ignore_sigpipe();
    834845
    835     // loop while ::write() returns -1 and errno == EINTR, in case
    836     // of an interrupting signal.
    837846    ssize_t writtenBytes;
    838     do {
    839 #ifdef Q_OS_SYMBIAN
    840             writtenBytes = ::write(socketDescriptor, data, len);
    841 #else
    842         writtenBytes = qt_safe_write(socketDescriptor, data, len);
    843 #endif
    844         // writtenBytes = QT_WRITE(socketDescriptor, data, len); ### TODO S60: Should this line be removed or the one above it?
    845     } while (writtenBytes < 0 && errno == EINTR);
     847#ifdef Q_OS_SYMBIAN
     848    // Symbian does not support signals natively and Open C returns EINTR when moving to offline
     849    writtenBytes = ::write(socketDescriptor, data, len);
     850#else
     851    writtenBytes = qt_safe_write(socketDescriptor, data, len);
     852#endif
    846853
    847854    if (writtenBytes < 0) {
     
    883890
    884891    ssize_t r = 0;
    885     do {
    886 #ifdef Q_OS_SYMBIAN
    887         r = ::read(socketDescriptor, data, maxSize);
    888 #else
    889         r = qt_safe_read(socketDescriptor, data, maxSize);
    890 #endif
    891     } while (r == -1 && errno == EINTR);
     892#ifdef Q_OS_SYMBIAN
     893    r = ::read(socketDescriptor, data, maxSize);
     894#else
     895    r = qt_safe_read(socketDescriptor, data, maxSize);
     896#endif
    892897
    893898    if (r < 0) {
     
    904909        case EINVAL:
    905910        case EIO:
    906             setError(QAbstractSocket::NetworkError, ReadErrorString);
     911           
    907912            break;
    908913#ifdef Q_OS_SYMBIAN
Note: See TracChangeset for help on using the changeset viewer.