Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/corelib/io/qwindowspipewriter.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    4141
    4242#include "qwindowspipewriter_p.h"
     43
    4344
    4445QT_BEGIN_NAMESPACE
     
    101102void QWindowsPipeWriter::run()
    102103{
    103     OVERLAPPED overl = {0, 0, 0, 0, NULL};
     104    OVERLAPPED overl;
     105    memset(&overl, 0, sizeof overl);
    104106    overl.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
    105107    forever {
     
    127129        while ((!quitNow) && totalWritten < maxlen) {
    128130            DWORD written = 0;
    129             // Write 2k at a time to prevent flooding the pipe. If you
    130             // write too much (4k-8k), the pipe can close
    131             // unexpectedly.
    132131            if (!WriteFile(writePipe, ptrData + totalWritten,
    133                     qMin<int>(2048, maxlen - totalWritten), &written, &overl)) {
     132                           maxlen - totalWritten, &written, &overl)) {
     133
    134134                if (GetLastError() == 0xE8/*NT_STATUS_INVALID_USER_BUFFER*/) {
    135135                    // give the os a rest
Note: See TracChangeset for help on using the changeset viewer.