VirtualBox

Changeset 39461 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 29, 2011 5:33:37 PM (13 years ago)
Author:
vboxsync
Message:

VBoxService/GuestCtrl: Only close stdin when we really wrote all data of last block.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlThread.cpp

    r39437 r39461  
    461461                rcReq = VINF_EOF;
    462462
    463             /* If this is the last write we need to close the stdin pipe on our
    464              * end and remove it from the poll set. */
    465             if (VBOXSERVICECTRLREQUEST_STDIN_WRITE_EOF == pRequest->enmType)
    466                 rc = VBoxServiceControlThreadCloseStdIn(hPollSet, phStdInW);
     463            /*
     464             * If this is the last write + we have really have written all data
     465             * we need to close the stdin pipe on our end and remove it from
     466             * the poll set.
     467             */
     468            if (   pRequest->enmType == VBOXSERVICECTRLREQUEST_STDIN_WRITE_EOF)
     469                && pRequest->cbData  == cbWritten)
     470            {
     471                    rc = VBoxServiceControlThreadCloseStdIn(hPollSet, phStdInW);
     472            }
    467473
    468474            /* Reqport back actual data written (if any). */
Note: See TracChangeset for help on using the changeset viewer.

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