- Timestamp:
- Sep 14, 2015 3:34:14 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDragAndDrop.cpp
r57654 r57743 940 940 if (RT_SUCCESS(rc)) 941 941 { 942 /* Set the protocol version to use. */942 /* Set the default protocol version to use. */ 943 943 pCtx->uProtocol = 2; 944 944 … … 948 948 } 949 949 950 if (RT_SUCCESS(rc)) 950 /* 951 * Check if the host is >= VBox 5.0 which in case supports GUEST_DND_CONNECT. 952 */ 953 bool fSupportsConnectReq = false; 954 if (RT_SUCCESS(rc)) 955 { 956 /* The guest property service might not be available. Not fatal. */ 957 uint32_t uGuestPropSvcClientID; 958 int rc2 = VbglR3GuestPropConnect(&uGuestPropSvcClientID); 959 if (RT_SUCCESS(rc2)) 960 { 961 char *pszHostVersion; 962 rc2 = VbglR3GuestPropReadValueAlloc(uGuestPropSvcClientID, "/VirtualBox/HostInfo/VBoxVer", &pszHostVersion); 963 if (RT_SUCCESS(rc2)) 964 { 965 fSupportsConnectReq = RTStrVersionCompare(pszHostVersion, "5.0") >= 0; 966 VbglR3GuestPropReadValueFree(pszHostVersion); 967 } 968 969 VbglR3GuestPropDisconnect(uGuestPropSvcClientID); 970 } 971 } 972 973 if (fSupportsConnectReq) 951 974 { 952 975 /* … … 969 992 rc2 = Msg.hdr.result; /* Not fatal. */ 970 993 994 if (RT_FAILURE(rc2)) 995 fSupportsConnectReq = false; 996 971 997 LogFlowFunc(("Connection request ended with rc=%Rrc\n", rc2)); 972 998 } 999 1000 /* GUEST_DND_CONNECT not supported; play safe here and just use protocol v1. */ 1001 if (!fSupportsConnectReq) 1002 pCtx->uProtocol = 1; /* Fall back to protocol version 1 (< VBox 5.0). */ 973 1003 974 1004 LogFlowFunc(("uClient=%RU32, uProtocol=%RU32, rc=%Rrc\n", pCtx->uClientID, pCtx->uProtocol, rc));
Note:
See TracChangeset
for help on using the changeset viewer.