Changeset 58371 in vbox
- Timestamp:
- Oct 22, 2015 10:40:49 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuestLib.h
r58212 r58371 758 758 * Use a union for the HGCM stuff then. */ 759 759 760 /** IN:HGCM client ID to use for communication. */760 /** HGCM client ID to use for communication. */ 761 761 uint32_t uClientID; 762 /** IN: Protocol version to use. */ 762 /** The VM's current session ID. */ 763 uint64_t uSessionID; 764 /** Protocol version to use. */ 763 765 uint32_t uProtocol; 764 /** OUT: Number of parameters retrieved. */766 /** Number of parameters retrieved for the current command. */ 765 767 uint32_t uNumParms; 766 /** IN:Max chunk size (in bytes) for data transfers. */768 /** Max chunk size (in bytes) for data transfers. */ 767 769 uint32_t cbMaxChunkSize; 768 770 } VBGLR3GUESTDNDCMDCTX, *PVBGLR3GUESTDNDCMDCTX; -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDragAndDrop.cpp
r58370 r58371 1361 1361 1362 1362 /* 1363 * Get the VM's session ID. 1364 * This is not fatal in case we're running with an ancient VBox version. 1365 */ 1366 pCtx->uSessionID = 0; 1367 int rc2 = VbglR3GetSessionId(&pCtx->uSessionID); 1368 LogFlowFunc(("uSessionID=%RU64, rc=%Rrc\n", pCtx->uSessionID, rc2)); 1369 1370 /* 1363 1371 * Check if the host is >= VBox 5.0 which in case supports GUEST_DND_CONNECT. 1364 1372 */ … … 1368 1376 /* The guest property service might not be available. Not fatal. */ 1369 1377 uint32_t uGuestPropSvcClientID; 1370 intrc2 = VbglR3GuestPropConnect(&uGuestPropSvcClientID);1378 rc2 = VbglR3GuestPropConnect(&uGuestPropSvcClientID); 1371 1379 if (RT_SUCCESS(rc2)) 1372 1380 { … … 1417 1425 } 1418 1426 1419 intrc2 = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));1427 rc2 = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); 1420 1428 if (RT_SUCCESS(rc2)) 1421 1429 rc2 = Msg.hdr.result; /* Not fatal. */ … … 1464 1472 1465 1473 int rc = vbglR3DnDGetNextMsgType(pCtx, &uMsg, &uNumParms, true /* fWait */); 1474 if (RT_SUCCESS(rc)) 1475 { 1476 /* Check for VM session change. */ 1477 uint64_t uSessionID; 1478 int rc2 = VbglR3GetSessionId(&uSessionID); 1479 if ( RT_SUCCESS(rc2) 1480 && (uSessionID != pCtx->uSessionID)) 1481 { 1482 LogFlowFunc(("VM session ID changed to %RU64, doing reconnect\n", uSessionID)); 1483 1484 /* Try a reconnect to the DnD service. */ 1485 rc2 = VbglR3DnDDisconnect(pCtx); 1486 AssertRC(rc2); 1487 rc2 = VbglR3DnDConnect(pCtx); 1488 AssertRC(rc2); 1489 1490 /* At this point we continue processing the messsages with the new client ID. */ 1491 } 1492 } 1493 1466 1494 if (RT_SUCCESS(rc)) 1467 1495 { … … 1559 1587 } 1560 1588 1589 if (RT_FAILURE(rc)) 1590 LogFlowFunc(("Returning error %Rrc\n", rc)); 1561 1591 return rc; 1562 1592 } … … 2068 2098 if (strRootDest.isNotEmpty()) 2069 2099 { 2070 void *pvURIList = (void *)strRootDest.c_str();/* URI root list. */2100 void *pvURIList = (void *)strRootDest.c_str(); /* URI root list. */ 2071 2101 uint32_t cbURLIist = (uint32_t)strRootDest.length() + 1; /* Include string termination. */ 2072 2102 … … 2169 2199 rc = Msg.hdr.result; 2170 2200 2171 LogFlowFunc(("Sending error %Rrc returned with rc=%Rrc\n", rcErr, rc)); 2201 if (RT_FAILURE(rc)) 2202 LogFlowFunc(("Sending error %Rrc failed with rc=%Rrc\n", rcErr, rc)); 2172 2203 return rc; 2173 2204 }
Note:
See TracChangeset
for help on using the changeset viewer.