VirtualBox

Changeset 13242 in vbox


Ignore:
Timestamp:
Oct 14, 2008 9:51:47 AM (16 years ago)
Author:
vboxsync
Message:

Additions/Windows: fix guest property update issue when someone is logged in straight away.

Location:
trunk/src/VBox/Additions/WINNT/VBoxService
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxService/VBoxVMInfo.h

    r13127 r13242  
    3232    fnWTSGetActiveConsoleSessionId pfnWTSGetActiveConsoleSessionId;
    3333    BOOL fFirstRun;
    34     uint32_t iUserCount;
     34    uint32_t cUsers;
    3535} VBOXINFORMATIONCONTEXT;
    3636
  • trunk/src/VBox/Additions/WINNT/VBoxService/VBoxVMInfoUser.cpp

    r13129 r13242  
    334334    vboxVMInfoWriteProp(a_pCtx, "GuestInfo/OS/LoggedInUsersList", (iUserCount > 0) ? szUserList : NULL);
    335335    vboxVMInfoWritePropInt(a_pCtx, "GuestInfo/OS/LoggedInUsers", iUserCount);
    336     if (a_pCtx->iUserCount != iUserCount)
     336    if (a_pCtx->cUsers != iUserCount || a_pCtx->cUsers == INT32_MAX)
    337337    {
    338338        /* Update this property ONLY if there is a real change from no users to
    339339         * users or vice versa. The only exception is that the initialization
    340          * of a_pCtx->iUserCount forces an update, but only once. This ensures
     340         * of a_pCtx->cUsers forces an update, but only once. This ensures
    341341         * consistent property settings even if the VM aborted previously. */
    342342        if (iUserCount == 0)
    343343            vboxVMInfoWriteProp(a_pCtx, "GuestInfo/OS/NoLoggedInUsers", "true");
    344         else if (a_pCtx->iUserCount == 0)
     344        else if (a_pCtx->cUsers == 0 || a_pCtx->cUsers == INT32_MAX)
    345345            vboxVMInfoWriteProp(a_pCtx, "GuestInfo/OS/NoLoggedInUsers", "false");
    346346    }
    347     a_pCtx->iUserCount = iUserCount;
     347    a_pCtx->cUsers = iUserCount;
    348348
    349349    return ret;
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