VirtualBox

Changeset 79276 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 21, 2019 1:10:30 PM (6 years ago)
Author:
vboxsync
Message:

Shared Clipboard/URI: Update.

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/ClipboardURIList.cpp

    r79267 r79276  
    114114    AssertPtrReturn(pcszDstBase, VERR_INVALID_POINTER);
    115115    AssertPtrReturn(pcszDstPath, VERR_INVALID_POINTER);
     116    AssertReturn(!(fFlags & ~SHAREDCLIPBOARDURILIST_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);
    116117
    117118    LogFlowFunc(("pcszSrcPath=%s, pcszDstPath=%s, pcszDstBase=%s, cchDstBase=%zu, fFlags=0x%x\n",
     
    280281
    281282    m_lstTree.append(pObject);
    282     m_lstRoot.append(pObject->GetSourcePathAbs());;
     283    m_lstRoot.append(pObject->GetSourcePathAbs());
    283284
    284285    m_cTotal++;
  • trunk/src/VBox/GuestHost/SharedClipboard/ClipboardURIObject.cpp

    r78942 r79276  
    121121void SharedClipboardURIObject::Close(void)
    122122{
     123    LogFlowFuncEnter();
     124
    123125    closeInternal();
    124126}
     
    337339            u.File.cbToProcess = u.File.objInfo.cbObject;
    338340            u.File.cbProcessed = 0;
     341
     342            m_enmView = enmView;
    339343        }
    340344    }
     
    467471    /* pcbRead is optional. */
    468472
    469     AssertMsgReturn(m_enmView == View_Source, ("Cannot read from an object which is not in source view\n"),
     473    AssertMsgReturn(m_enmView == View_Source, ("Cannot read from an object which is not in source view (is 0x%x)\n", m_enmView),
    470474                    VERR_INVALID_STATE);
    471475
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-uri.cpp

    r79270 r79276  
    13701370
    13711371                dirData.pszPath = RTStrDup(strPath.c_str());
    1372                 dirData.cbPath  = (uint32_t)strlen(dirData.pszPath) + 1 /* Include termination */;
     1372                dirData.cbPath  = (uint32_t)strlen(dirData.pszPath);
    13731373
    13741374                rc = pTransfer->pProvider->WriteDirectory(&dirData);
     
    13911391
    13921392                fileHdr.pszFilePath = RTStrDup(strPath.c_str());
    1393                 fileHdr.cbFilePath  = (uint32_t)strlen(fileHdr.pszFilePath) + 1 /* Include termination */;
     1393                fileHdr.cbFilePath  = (uint32_t)strlen(fileHdr.pszFilePath);
    13941394                fileHdr.cbSize      = pObj->GetSize();
    13951395                fileHdr.fFlags      = 0;
     
    14131413                    if (RT_SUCCESS(rc))
    14141414                    {
    1415                         rc = pTransfer->pProvider->WriteFileData(pvData, cbRead);
     1415                        uint32_t cbToRead = cbRead;
     1416                        rc = pTransfer->pProvider->WriteFileData(pvData, cbToRead, 0 /* fFlags */, &cbRead);
    14161417                    }
    14171418
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-uri.cpp

    r79267 r79276  
    293293    }
    294294
    295     bool fDispatchToProvider = false; /* Whether to (also) dispatch the HCGCM data to the transfer provider. */
     295    bool fDispatchToProvider = false; /* Whether to (also) dispatch the HGCM data to the transfer provider. */
    296296
    297297    int rc = VERR_INVALID_PARAMETER; /* Play safe. */
     
    466466                const char *pszCacheDir = pArea->GetDirAbs();
    467467
    468     RT_BREAKPOINT();
    469 
    470468                char pszPathAbs[RTPATH_MAX];
    471469                rc = RTPathJoin(pszPathAbs, sizeof(pszPathAbs), pszCacheDir, fileHdr.pszFilePath);
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