Changeset 33723 in vbox for trunk/src/VBox/Main/GuestImpl.cpp
- Timestamp:
- Nov 3, 2010 1:06:12 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/GuestImpl.cpp
r33697 r33723 258 258 ComSafeArrayAsInParam(args), 259 259 ComSafeArrayAsInParam(env), 260 Bstr("").raw() /* Username */,260 Bstr("").raw() /* Username. */, 261 261 Bstr("").raw() /* Password */, 262 10 * 1000 /* Wait 10s for getting the process started */, 263 &uPID, progressCopy.asOutParam()); 264 if (SUCCEEDED(rc)) 262 5 * 1000 /* Wait 10s for getting the process started. */, 263 &uPID, progressCopy.asOutParam(), &vrc); 264 if (RT_FAILURE(vrc)) 265 { 266 switch (vrc) 267 { 268 /* If we got back VERR_INVALID_PARAMETER we're running an old(er) Guest Additions version 269 * (< 4.0) which does not support automatic updating and/or has not the internal tool "vbox_cat". */ 270 case VERR_INVALID_PARAMETER: 271 rc = setError(VBOX_E_NOT_SUPPORTED, 272 tr("Currently installed Guest Additions don't support automatic updating, please update them manually")); 273 break; 274 /* Getting back a VERR_TIMEOUT basically means that either VBoxService on the guest does not run (anymore) or that 275 * no Guest Additions (on a supported automatic updating OS) are installed at all. */ 276 case VERR_TIMEOUT: 277 rc = setError(VBOX_E_NOT_SUPPORTED, 278 tr("Guest Additions seem not to be installed on the guest or are not responding, please update them manually")); 279 break; 280 281 default: 282 break; 283 } 284 } 285 else 265 286 { 266 287 if (aTask->progress) … … 362 383 Bstr("").raw() /* Username */, 363 384 Bstr("").raw() /* Password */, 364 10 * 1000 /* Wait 10s for getting the process started */,365 &uPID, progressInstaller.asOutParam() );385 5 * 1000 /* Wait 5s for getting the process started */, 386 &uPID, progressInstaller.asOutParam(), &vrc); 366 387 if (SUCCEEDED(rc)) 367 388 { … … 1456 1477 return executeProcessInternal(aCommand, aFlags, ComSafeArrayInArg(aArguments), 1457 1478 ComSafeArrayInArg(aEnvironment), 1458 aUserName, aPassword, aTimeoutMS, aPID, aProgress );1479 aUserName, aPassword, aTimeoutMS, aPID, aProgress, NULL /* rc */); 1459 1480 #endif 1460 1481 } … … 1463 1484 ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment), 1464 1485 IN_BSTR aUserName, IN_BSTR aPassword, 1465 ULONG aTimeoutMS, ULONG *aPID, IProgress **aProgress )1486 ULONG aTimeoutMS, ULONG *aPID, IProgress **aProgress, int *pRC) 1466 1487 { 1467 1488 /** @todo r=bird: Eventually we should clean up all the timeout parameters … … 1481 1502 && !(aFlags & ExecuteProcessFlag_WaitForProcessStartOnly)) 1482 1503 { 1504 if (pRC) 1505 *pRC = VERR_INVALID_PARAMETER; 1483 1506 return setError(E_INVALIDARG, tr("Unknown flags (%#x)"), aFlags); 1484 1507 } … … 1508 1531 Bstr(tr("Starting process ...")).raw()); /* Description of first stage. */ 1509 1532 } 1510 if (FAILED(rc)) return rc;1533 ComAssertRC(rc); 1511 1534 1512 1535 /* … … 1765 1788 if (RT_FAILURE(vrc)) 1766 1789 { 1767 if (! Utf8UserName.isEmpty()) /* Skip logging internal calls. */1790 if (!pRC) /* Skip logging internal calls. */ 1768 1791 LogRel(("Executing guest process \"%s\" as user \"%s\" failed with %Rrc\n", 1769 1792 Utf8Command.c_str(), Utf8UserName.c_str(), vrc)); 1770 1793 } 1794 1795 if (pRC) 1796 *pRC = vrc; 1771 1797 } 1772 1798 catch (std::bad_alloc &) … … 2308 2334 Bstr(Utf8UserName).raw(), 2309 2335 Bstr(Utf8Password).raw(), 2310 10 * 1000 /* Wait 10s for getting the process started*/,2336 5 * 1000 /* Wait 5s for getting the process started. */, 2311 2337 &uPID, execProgress.asOutParam()); 2312 2338 }
Note:
See TracChangeset
for help on using the changeset viewer.