Changeset 21528 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Jul 13, 2009 11:52:24 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49994
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
r21246 r21528 67 67 static uint32_t g_VMInfoGuestPropSvcClientID = 0; 68 68 /** Number of logged in users in OS. */ 69 static uint32_t g_VMInfoLoggedInUsers = 0;69 static uint32_t g_VMInfoLoggedInUsers = UINT32_MAX; 70 70 #ifdef RT_OS_WINDOWS 71 71 /** Function prototypes for dynamic loading. */ … … 229 229 230 230 ::LsaFreeReturnBuffer(pSessions); 231 #endif /* TARGET_NT4 */ 231 #endif /* TARGET_NT4 */ 232 232 #else 233 233 utmp* ut_user; … … 257 257 VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/LoggedInUsersList", (uiUserCount > 0) ? szUserList : NULL); 258 258 VboxServiceWritePropInt(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/LoggedInUsers", uiUserCount); 259 if (g_VMInfoLoggedInUsers != uiUserCount || g_VMInfoLoggedInUsers == INT32_MAX)259 if (g_VMInfoLoggedInUsers != uiUserCount || g_VMInfoLoggedInUsers == UINT32_MAX) 260 260 { 261 261 /* Update this property ONLY if there is a real change from no users to 262 262 * users or vice versa. The only exception is that the initialization 263 * of a_pCtx->cUsers forces an update, but only once. This ensures264 * consistent propertysettings even if the VM aborted previously. */263 * forces an update, but only once. This ensures consistent property 264 * settings even if the VM aborted previously. */ 265 265 if (uiUserCount == 0) 266 266 VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/NoLoggedInUsers", "true"); 267 else if (g_VMInfoLoggedInUsers == 0 || uiUserCount == INT32_MAX)267 else if (g_VMInfoLoggedInUsers == 0) 268 268 VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/NoLoggedInUsers", "false"); 269 269 }
Note:
See TracChangeset
for help on using the changeset viewer.