VirtualBox

Changeset 39351 in vbox


Ignore:
Timestamp:
Nov 17, 2011 3:08:31 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
74933
Message:

Main-OVF: make really sure all data is processed before stopping the reading

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/ApplianceImplIO.cpp

    r38469 r39351  
    10431043    {
    10441044        rc = sha1ReadSyncCallback(pvUser, pvStorage, pInt->cbCurAll, 0,
    1045                                     (size_t)(uOffset - pInt->cbCurAll), 0);
     1045                                  (size_t)(uOffset - pInt->cbCurAll), 0);
    10461046        if (RT_FAILURE(rc))
    10471047            return rc;
     1048//        RTPrintf("Gap Read uOffset: %7lu cbRead: %7lu = %7lu\n", uOffset, cbRead, uOffset + cbRead);
    10481049    }
    10491050
     
    10551056            break;
    10561057        size_t cbAvail = RTCircBufUsed(pInt->pCircBuf);
    1057         if (   cbAvail == 0
    1058             && pInt->fEOF)
     1058        if (    cbAvail == 0
     1059            &&  pInt->fEOF
     1060            && !RTCircBufIsWriting(pInt->pCircBuf))
    10591061        {
    10601062            break;
     
    10991101
    11001102    /* Signal the thread to read more data in the mean time. */
    1101     if (   RT_SUCCESS(rc)
    1102         && RTCircBufFree(pInt->pCircBuf) >= (RTCircBufSize(pInt->pCircBuf) / 2))
     1103    if (    RT_SUCCESS(rc)
     1104        &&  RTCircBufFree(pInt->pCircBuf) >= (RTCircBufSize(pInt->pCircBuf) / 2))
    11031105        rc = sha1SignalManifestThread(pInt, STATUS_READ);
    11041106
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette