VirtualBox

Changeset 84153 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
May 5, 2020 8:00:32 PM (5 years ago)
Author:
vboxsync
Message:

Main: Reverted r137602 & r137737 as the API is not actually needed. bugref:9699

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

Legend:

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

    r84141 r84153  
    505505 * Public method implementation.
    506506 */
    507 HRESULT Appliance::getManifest(com::Utf8Str &aManifest, com::Utf8Str &aManifestName)
    508 {
    509     /* Write lock the appliance here as we don't want concurrent hMemFileTheirManifest
    510        accesses (lazyness/paranoia). */
    511     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    512 
    513     Assert(aManifest.isEmpty());
    514     if (m->hMemFileTheirManifest != NIL_RTVFSFILE)
    515     {
    516         uint64_t cchManifest = 0;
    517         int rc = RTVfsFileQuerySize(m->hMemFileTheirManifest, &cchManifest);
    518         AssertRCReturn(rc, setErrorVrc(rc));
    519 
    520         rc = aManifest.reserveNoThrow(cchManifest + 1);
    521         AssertRCReturn(rc, setErrorVrc(rc));
    522 
    523         char *pszManifest = aManifest.mutableRaw();
    524         rc = RTVfsFileReadAt(m->hMemFileTheirManifest, 0, pszManifest, cchManifest, NULL);
    525         pszManifest[cchManifest] = '\0';
    526         AssertRCReturn(rc, setErrorVrc(rc));
    527         RTStrPurgeEncoding(pszManifest);
    528         aManifest.jolt();
    529     }
    530 
    531     aManifestName = m->strManifestName;
    532     return S_OK;
    533 }
    534 
    535 /**
    536  * Public method implementation.
    537  */
    538507HRESULT Appliance::getDisks(std::vector<com::Utf8Str> &aDisks)
    539508{
  • trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp

    r84141 r84153  
    25612561 *                              reference is always consumed.
    25622562 * @param   pszSubFileNm        The manifest filename (no path) for error
    2563  *                              messages, logging and strManifestName.
     2563 *                              messages and logging.
    25642564 * @returns COM status code, error info set.
    25652565 * @throws  Nothing
     
    25682568{
    25692569    LogFlowFunc(("%s[%s]\n", pTask->locInfo.strPath.c_str(), pszSubFileNm));
    2570 
    2571     /* Remember the manifet file name */
    2572     HRESULT hrc = m->strManifestName.assignEx(pszSubFileNm);
    2573     AssertReturn(SUCCEEDED(hrc), hrc);
    25742570
    25752571    /*
     
    25952591    RTVfsIoStrmRelease(hVfsIos);
    25962592    if (RT_FAILURE(vrc))
    2597         return setErrorVrc(vrc, tr("Failed to parse manifest file '%s' for '%s' (%Rrc): %s"),
    2598                            pszSubFileNm, pTask->locInfo.strPath.c_str(), vrc, szErr);
     2593        throw setErrorVrc(vrc, tr("Failed to parse manifest file '%s' for '%s' (%Rrc): %s"),
     2594                          pszSubFileNm, pTask->locInfo.strPath.c_str(), vrc, szErr);
    25992595
    26002596    /*
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