VirtualBox

Changeset 42787 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 13, 2012 9:49:28 AM (12 years ago)
Author:
vboxsync
Message:

Guest Control 2.0: Bugfixes.

Location:
trunk/src/VBox/Main/src-client
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp

    r42721 r42787  
    657657        {
    658658            fSignal = (uWaitFlags & ProcessWaitForFlag_Start);
    659             waitRes = ProcessWaitResult_Status;
     659            waitRes = ProcessWaitResult_Start;
    660660
    661661            mData.mStatus = ProcessStatus_Started;
     
    714714        {
    715715            fSignal = TRUE; /* Signal in any case. */
     716            /* Do we need to report termination? */
    716717            waitRes = (mData.mProcess.mFlags & ProcessCreateFlag_IgnoreOrphanedProcesses)
    717                     ? ProcessWaitResult_Terminate : ProcessWaitResult_Status;
     718                    ? ProcessWaitResult_Status : ProcessWaitResult_Terminate;
    718719
    719720            mData.mStatus = ProcessStatus_Down;
     
    886887
    887888    if (mData.mStatus != ProcessStatus_Started)
     889    {
     890        if (pcbRead)
     891            *pcbRead = 0;
    888892        return VINF_SUCCESS; /* Nothing to read anymore. */
     893    }
    889894
    890895    uint32_t uContextID = 0;
     
    12441249        || (fWaitFlags & ProcessWaitForFlag_StdErr))
    12451250    {
    1246         /* Filter out waits which are *not* supported using
    1247          * older guest control Guest Additions. */
    1248         AssertPtr(mData.mParent);
    1249         if (mData.mParent->getProtocolVersion() < 2)
    1250         {
    1251             /* We don't support waiting for stdin, out + err,
    1252              * just skip waiting then. */
    1253             if (   (fWaitFlags & ProcessWaitForFlag_StdIn)
    1254                 || (fWaitFlags & ProcessWaitForFlag_StdOut)
    1255                 || (fWaitFlags & ProcessWaitForFlag_StdErr))
    1256             {
    1257                 /* Use _Any because we don't know what to tell the caller. */
    1258                 waitRes.mResult = ProcessWaitResult_Any;
    1259             }
    1260         }
    1261 
    12621251        switch (mData.mStatus)
    12631252        {
     
    12811270                break;
    12821271
     1272            case ProcessStatus_Started:
     1273            {
     1274                /* Filter out waits which are *not* supported using
     1275                 * older guest control Guest Additions. */
     1276                AssertPtr(mData.mParent);
     1277                if (mData.mParent->getProtocolVersion() < 2)
     1278                {
     1279                    /* We don't support waiting for stdin, out + err,
     1280                     * just skip waiting then. */
     1281                    if (   (fWaitFlags & ProcessWaitForFlag_StdIn)
     1282                        || (fWaitFlags & ProcessWaitForFlag_StdOut)
     1283                        || (fWaitFlags & ProcessWaitForFlag_StdErr))
     1284                    {
     1285                        /* Use _Any because we don't know what to tell the caller. */
     1286                        waitRes.mResult = ProcessWaitResult_Any;
     1287                    }
     1288                }
     1289
     1290                break;
     1291            }
     1292
    12831293            case ProcessStatus_Undefined:
    12841294            case ProcessStatus_Starting:
    1285             case ProcessStatus_Started:
    12861295                /* Do the waiting below. */
    12871296                break;
     
    15181527    }
    15191528
     1529    LogFlowThisFunc(("readData returned %Rrc, cbRead=%RU64\n", vrc, cbRead));
     1530
    15201531    /** @todo Do setError() here. */
    15211532    HRESULT hr = RT_SUCCESS(vrc) ? S_OK : VBOX_E_IPRT_ERROR;
     
    16261637    com::SafeArray<BYTE> data(ComSafeArrayInArg(aData));
    16271638    int vrc = writeData(aHandle, aFlags, data.raw(), data.size(), aTimeoutMS, (uint32_t*)aWritten);
     1639
     1640    LogFlowThisFunc(("writeData returned %Rrc, aWritten=%RU32\n", vrc, aWritten));
     1641
    16281642    /** @todo Do setError() here. */
    16291643    HRESULT hr = RT_SUCCESS(vrc) ? S_OK : VBOX_E_IPRT_ERROR;
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r42783 r42787  
    257257                                   30 * 1000 /* Timeout */, waitRes);
    258258            if (   RT_FAILURE(rc)
    259                 || waitRes.mResult != ProcessWaitForFlag_StdIn)
     259                || (   waitRes.mResult != ProcessWaitResult_StdIn
     260                    && waitRes.mResult != ProcessWaitResult_Any))
    260261            {
    261262                break;
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