Changeset 55556 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Apr 30, 2015 2:27:39 PM (10 years ago)
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestDnDPrivate.cpp
r55549 r55556 317 317 uStatus, uPercentage, rcOp)); 318 318 319 int vrc = VINF_SUCCESS;319 int rc = VINF_SUCCESS; 320 320 if (!m_progress.isNull()) 321 321 { … … 383 383 } 384 384 385 LogFlowFuncLeaveRC( vrc);386 return vrc;385 LogFlowFuncLeaveRC(rc); 386 return rc; 387 387 } 388 388 -
trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp
r55549 r55556 593 593 if (RT_SUCCESS(rc)) 594 594 { 595 /** @todo Unescpae path before printing. */596 LogRel2(("DnD: Transferring guest file to host: %s\n", pCtx->mURI.objURI.GetDestPath().c_str()));597 598 595 /* Note: Protocol v1 does not send any file sizes, so always 0. */ 599 596 if (mDataBase.mProtocolVersion >= 2) 600 597 rc = pCtx->mURI.objURI.SetSize(cbSize); 598 599 /** @todo Unescpae path before printing. */ 600 LogRel2(("DnD: Transferring guest file to host: %s (%RU64 bytes, mode 0x%x)\n", 601 pCtx->mURI.objURI.GetDestPath().c_str(), pCtx->mURI.objURI.GetSize(), pCtx->mURI.objURI.GetMode())); 602 603 /** @todo Set progress object title to current file being transferred? */ 601 604 602 605 if (!cbSize) /* 0-byte file? Close again. */ … … 737 740 * Reset any old data. 738 741 */ 739 pCtx->mData.vecData.clear(); 740 pCtx->mData.cbToProcess = 0; 741 pCtx->mData.cbProcessed = 0; 742 743 pResp->reset(); 744 pResp->resetProgress(m_pGuest); 742 pCtx->mData.Reset(); 743 pCtx->mURI.Reset(); 745 744 746 745 /* Set the format we are going to retrieve to have it around 747 746 * when retrieving the data later. */ 747 pResp->reset(); 748 748 pResp->setFormat(pCtx->mFormat); 749 749 … … 876 876 return VERR_INVALID_POINTER; 877 877 878 #define REGISTER_CALLBACK(x) \878 #define REGISTER_CALLBACK(x) \ 879 879 rc = pResp->setCallback(x, i_receiveURIDataCallback, pCtx); \ 880 if (RT_FAILURE(rc)) \880 if (RT_FAILURE(rc)) \ 881 881 return rc; 882 882 883 #define UNREGISTER_CALLBACK(x) \ 884 rc = pResp->setCallback(x, NULL); \ 885 AssertRC(rc); 883 #define UNREGISTER_CALLBACK(x) \ 884 { \ 885 int rc2 = pResp->setCallback(x, NULL); \ 886 AssertRC(rc2); \ 887 } 886 888 887 889 /* … … 927 929 rc = pCtx->mCallback.Wait(msTimeout); 928 930 LogFlowFunc(("URI callback done, rc=%Rrc\n", rc)); 931 if (RT_SUCCESS(rc)) 932 { 933 rc = pCtx->mCallback.Result(); 934 LogFlowFunc(("Callback result is %Rrc\n", rc)); 935 } 929 936 } 930 937 … … 946 953 if (RT_FAILURE(rc)) 947 954 { 948 LogFlowFunc(("Rolling back ...\n")); 949 950 /* Rollback by removing any stuff created. */ 951 for (size_t i = 0; i < pCtx->mURI.lstFiles.size(); ++i) 952 RTFileDelete(pCtx->mURI.lstFiles.at(i).c_str()); 953 for (size_t i = 0; i < pCtx->mURI.lstDirs.size(); ++i) 954 RTDirRemove(pCtx->mURI.lstDirs.at(i).c_str()); 955 } 956 957 /* Try removing (hopefully) empty drop directory in any case. */ 958 if (pCtx->mURI.strDropDir.isNotEmpty()) 959 RTDirRemove(pCtx->mURI.strDropDir.c_str()); 955 int rc2 = pCtx->mURI.Rollback(); /** @todo Inform user on rollback failure? */ 956 LogFlowFunc(("Rolling back ended with rc=%Rrc\n", rc2)); 957 } 960 958 961 959 LogFlowFuncLeaveRC(rc); … … 1121 1119 } 1122 1120 1123 LogFlowFunc(("cbProcessed=%RU64, cbToProcess=%RU64, fNotify=%RTbool \n",1124 pCtx->mData.cbProcessed, pCtx->mData.cbToProcess, fNotify ));1121 LogFlowFunc(("cbProcessed=%RU64, cbToProcess=%RU64, fNotify=%RTbool, rc=%Rrc\n", 1122 pCtx->mData.cbProcessed, pCtx->mData.cbToProcess, fNotify, rc)); 1125 1123 1126 1124 if (fNotify) -
trunk/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp
r55549 r55556 737 737 LogRel2(("DnD: Transferring host file to guest: %s (%RU64 bytes, mode 0x%x)\n", 738 738 strPathSrc.c_str(), aFile.GetSize(), aFile.GetMode())); 739 740 /** @todo Set progress object title to current file being transferred? */ 739 741 } 740 742 else
Note:
See TracChangeset
for help on using the changeset viewer.