VirtualBox

Ignore:
Timestamp:
Mar 10, 2011 12:18:20 PM (14 years ago)
Author:
vboxsync
Message:

VBoxService/VBoxHeadless: Drop VRDP connection on manual restart / hard VM reset.

Location:
trunk/src/VBox/Additions/common/VBoxService
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.cpp

    r36219 r36249  
    9999        if (RTStrAPrintfV(&pszValue, pszValueFormat, va) >= 0)
    100100        {
    101             if (fFlags & VBOXSERVICEPROPCACHEFLAG_TEMPORARY)
     101            if (fFlags & VBOXSERVICEPROPCACHEFLAG_TRANSIENT)
    102102            {
    103103                /*
     
    118118            }
    119119            else
    120                 rc = VbglR3GuestPropWriteValue(u32ClientId, pszName, pszValue);
     120                rc = VbglR3GuestPropWriteValue(u32ClientId, pszName, pszValue /* No transient flags set */);
    121121            RTStrFree(pszValue);
    122122        }
     
    383383            RTListNodeRemove(&pNode->NodeSucc);
    384384
    385             /*
    386              * When destroying the cache and we have a temporary value, remove the
    387              * (eventually) set TRANSIENT_RESET flag from it so that it doesn't get deleted
    388              * by the host side in order to put the actual reset value in it.
    389              */
    390385            if (pNode->fFlags & VBOXSERVICEPROPCACHEFLAG_TEMPORARY)
    391                 vboxServicePropCacheWritePropF(pCache->uClientID, pNode->pszName, 0 /* Flags, clear all */, pNode->pszValueReset);
     386            {
     387                rc = vboxServicePropCacheWritePropF(pCache->uClientID, pNode->pszName,
     388                                                    pNode->fFlags, pNode->pszValueReset);
     389            }
    392390
    393391            AssertPtr(pNode->pszName);
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.h

    r36178 r36249  
    2424
    2525/** Indicates wheter a guest property is temporary and either should
    26  *  get deleted when
    27  *  - a) the property cache gets destroyed, or
    28  *  - b) the VM gets a hard reset / shutdown
    29  *  or gets a default "reset" value (if specified via VBoxServicePropCacheUpdateEntry)
    30  *  when the property cache gets properly destroyed.
     26 *  - a) get a "reset" value assigned (via VBoxServicePropCacheUpdateEntry)
     27 *       as soon as the property cache gets destroyed, or
     28 *  - b) get deleted when no reset value is specified.
    3129 */
    32 #define VBOXSERVICEPROPCACHEFLAG_TEMPORARY          RT_BIT(1)
     30#define VBOXSERVICEPROPCACHEFLAG_TEMPORARY              RT_BIT(1)
    3331/** Indicates whether a property every time needs to be updated, regardless
    3432 *  if its real value changed or not. */
    35 #define VBOXSERVICEPROPCACHEFLAG_ALWAYS_UPDATE      RT_BIT(2)
     33#define VBOXSERVICEPROPCACHEFLAG_ALWAYS_UPDATE          RT_BIT(2)
     34/** The guest property gets deleted when
     35 *  - a) the property cache gets destroyed, or
     36 *  - b) the VM gets reset / shutdown / destroyed.
     37 */
     38#define VBOXSERVICEPROPCACHEFLAG_TRANSIENT              RT_BIT(3)
    3639
    3740int VBoxServicePropCacheCreate(PVBOXSERVICEVEPROPCACHE pCache, uint32_t uClientId);
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp

    r33554 r36249  
    147147         */
    148148        VBoxServicePropCacheUpdateEntry(&g_VMInfoPropCache, "/VirtualBox/GuestInfo/OS/LoggedInUsersList",
    149                                         VBOXSERVICEPROPCACHEFLAG_TEMPORARY, NULL /* Delete on exit */);
     149                                        VBOXSERVICEPROPCACHEFLAG_TEMPORARY | VBOXSERVICEPROPCACHEFLAG_TRANSIENT, NULL /* Delete on exit */);
    150150        VBoxServicePropCacheUpdateEntry(&g_VMInfoPropCache, "/VirtualBox/GuestInfo/OS/LoggedInUsers",
    151                                         VBOXSERVICEPROPCACHEFLAG_TEMPORARY, "0");
     151                                        VBOXSERVICEPROPCACHEFLAG_TEMPORARY | VBOXSERVICEPROPCACHEFLAG_TRANSIENT, "0");
    152152        VBoxServicePropCacheUpdateEntry(&g_VMInfoPropCache, "/VirtualBox/GuestInfo/OS/NoLoggedInUsers",
    153                                         VBOXSERVICEPROPCACHEFLAG_TEMPORARY, "true");
     153                                        VBOXSERVICEPROPCACHEFLAG_TEMPORARY | VBOXSERVICEPROPCACHEFLAG_TRANSIENT, "true");
    154154        VBoxServicePropCacheUpdateEntry(&g_VMInfoPropCache, "/VirtualBox/GuestInfo/Net/Count",
    155155                                        VBOXSERVICEPROPCACHEFLAG_TEMPORARY | VBOXSERVICEPROPCACHEFLAG_ALWAYS_UPDATE, NULL /* Delete on exit */);
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