Changeset 74495 in vbox
- Timestamp:
- Sep 27, 2018 12:08:01 PM (6 years ago)
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp
r74492 r74495 5 5 6 6 /* 7 * Copyright (C) 2014-201 7Oracle Corporation7 * Copyright (C) 2014-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 1066 1066 1067 1067 int vrc = pThis->i_receiveData(pTask->getCtx(), RT_INDEFINITE_WAIT /* msTimeout */); 1068 AssertRC(vrc); 1069 /** @todo 1070 * 1071 * r=bird: What happens with @a vrc? 1072 * 1073 */ 1068 if (RT_FAILURE(vrc)) /* In case we missed some error handling within i_receiveData(). */ 1069 { 1070 AssertFailed(); 1071 LogRel(("DnD: Receiving data from guest failed with %Rrc\n", vrc)); 1072 } 1074 1073 1075 1074 AutoWriteLock alock(pThis COMMA_LOCKVAL_SRC_POS); … … 1079 1078 pThis->mDataBase.m_cTransfersPending--; 1080 1079 1081 LogFlowFunc(("pSource=%p vrc=%Rrc (ignored)\n", (GuestDnDSource *)pThis, vrc));1080 LogFlowFunc(("pSource=%p, vrc=%Rrc (ignored)\n", (GuestDnDSource *)pThis, vrc)); 1082 1081 } 1083 1082 … … 1160 1159 if (RT_FAILURE(rc)) 1161 1160 { 1162 if (rc == VERR_CANCELLED) 1163 { 1164 int rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED); 1161 if (rc == VERR_CANCELLED) /* Transfer was cancelled by the host. */ 1162 { 1163 /* 1164 * Now that we've cleaned up tell the guest side to cancel. 1165 * This does not imply we're waiting for the guest to react, as the 1166 * host side never must depend on anything from the guest. 1167 */ 1168 int rc2 = sendCancel(); 1165 1169 AssertRC(rc2); 1166 1170 1167 rc2 = sendCancel();1171 rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED); 1168 1172 AssertRC(rc2); 1169 1173 } … … 1174 1178 AssertRC(rc2); 1175 1179 } 1180 1181 rc = VINF_SUCCESS; /* The error was handled by the setProgress() calls above. */ 1176 1182 } 1177 1183 … … 1278 1284 if (RT_FAILURE(rc)) 1279 1285 { 1286 int rc2 = droppedFiles.Rollback(); 1287 if (RT_FAILURE(rc2)) 1288 LogRel(("DnD: Deleting left over temporary files failed (%Rrc), please remove directory '%s' manually\n", 1289 rc2, droppedFiles.GetDirAbs())); 1290 1280 1291 if (rc == VERR_CANCELLED) 1281 1292 { 1282 int rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED); 1293 /* 1294 * Now that we've cleaned up tell the guest side to cancel. 1295 * This does not imply we're waiting for the guest to react, as the 1296 * host side never must depend on anything from the guest. 1297 */ 1298 rc2 = sendCancel(); 1283 1299 AssertRC(rc2); 1284 1300 1285 rc2 = sendCancel();1301 rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED); 1286 1302 AssertRC(rc2); 1287 1303 } … … 1292 1308 AssertRC(rc2); 1293 1309 } 1294 } 1295 1296 if (RT_FAILURE(rc)) 1297 { 1298 int rc2 = droppedFiles.Rollback(); 1299 if (RT_FAILURE(rc2)) 1300 LogRel(("DnD: Deleting left over temporary files failed (%Rrc). Please remove directory manually: %s\n", 1301 rc2, droppedFiles.GetDirAbs())); 1310 1311 rc = VINF_SUCCESS; /* The error was handled by the setProgress() calls above. */ 1302 1312 } 1303 1313 -
trunk/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp
r74492 r74495 5 5 6 6 /* 7 * Copyright (C) 2014-201 7Oracle Corporation7 * Copyright (C) 2014-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 567 567 { 568 568 LogFlowFunc(("pTask=%p\n", pTask)); 569 570 569 AssertPtrReturnVoid(pTask); 571 570 … … 578 577 579 578 int vrc = pThis->i_sendData(pTask->getCtx(), RT_INDEFINITE_WAIT /* msTimeout */); 580 NOREF(vrc); 581 /** @todo 582 * 583 * r=bird: What happens with @a vrc? 584 * 585 */ 579 if (RT_FAILURE(vrc)) /* In case we missed some error handling within i_sendData(). */ 580 { 581 AssertFailed(); 582 LogRel(("DnD: Sending data to guest failed with %Rrc\n", vrc)); 583 } 586 584 587 585 AutoWriteLock alock(pThis COMMA_LOCKVAL_SRC_POS); … … 591 589 pThis->mDataBase.m_cTransfersPending--; 592 590 593 LogFlowFunc(("pTarget=%p vrc=%Rrc (ignored)\n", (GuestDnDTarget *)pThis, vrc));591 LogFlowFunc(("pTarget=%p, vrc=%Rrc (ignored)\n", (GuestDnDTarget *)pThis, vrc)); 594 592 } 595 593 … … 1419 1417 if (RT_FAILURE(rc)) 1420 1418 { 1421 if (rc == VERR_CANCELLED) 1422 pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED, VINF_SUCCESS); 1419 if (rc == VERR_CANCELLED) /* Transfer was cancelled by the host. */ 1420 { 1421 /* 1422 * Now that we've cleaned up tell the guest side to cancel. 1423 * This does not imply we're waiting for the guest to react, as the 1424 * host side never must depend on anything from the guest. 1425 */ 1426 int rc2 = sendCancel(); 1427 AssertRC(rc2); 1428 1429 rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED, VINF_SUCCESS); 1430 AssertRC(rc2); 1431 } 1423 1432 else if (rc != VERR_GSTDND_GUEST_ERROR) /* Guest-side error are already handled in the callback. */ 1424 pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR, rc, 1425 GuestDnDTarget::i_hostErrorToString(rc)); 1426 } 1427 1428 /* 1429 * Now that we've cleaned up tell the guest side to cancel. 1430 * This does not imply we're waiting for the guest to react, as the 1431 * host side never must depend on anything from the guest. 1432 */ 1433 if (rc == VERR_CANCELLED) 1434 { 1435 int rc2 = sendCancel(); 1436 AssertRC(rc2); 1433 { 1434 int rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR, rc, 1435 GuestDnDTarget::i_hostErrorToString(rc)); 1436 AssertRC(rc2); 1437 } 1438 1439 rc = VINF_SUCCESS; /* The error was handled by the setProgress() calls above. */ 1437 1440 } 1438 1441
Note:
See TracChangeset
for help on using the changeset viewer.