Skip to content

Commit

Permalink
TightVNC 2.8.79
Browse files Browse the repository at this point in the history
. Server for Windows: Fixed an issue with file transfers that prevented them from working correctly on Windows Server 2008 R2 and Windows 7 when using TightVNC versions from 2.8.75 to 2.8.78.
  • Loading branch information
chenall committed Apr 7, 2023
1 parent 71815c0 commit ccd30c8
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
Binary file modified hookldr/hookldr.rc
Binary file not shown.
Binary file modified screen-hooks/screenhooks.rc
Binary file not shown.
Binary file modified setup-helper/setup-helper.rc
Binary file not shown.
Binary file modified tvnserver/tvnserver.rc
Binary file not shown.
Binary file modified tvnviewer/tvnviewer.rc
Binary file not shown.
26 changes: 15 additions & 11 deletions win-system/WTS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,23 @@ bool WTS::sessionIsLocked(DWORD sessionId)
WTSSessionInfoEx, (LPWSTR**)&buffer, &byteCount) == 0) {
return false;
}
if (buffer->Level == 1) {
WTSINFOEX_LEVEL1_W info = buffer->Data.WTSInfoExLevel1;
LONG locked = info.SessionFlags;
// reverse for Windows Server 2008 R2 and Windows 7
if (Environment::isWin7() && locked == WTS_SESSIONSTATE_UNLOCK) {
locked = WTS_SESSIONSTATE_LOCK;
}
if (locked == WTS_SESSIONSTATE_LOCK) {
wtsFreeMemory(buffer);
return true;
}
if (buffer->Level != 1) {
wtsFreeMemory(buffer);
return false;
}
WTSINFOEX_LEVEL1_W info = buffer->Data.WTSInfoExLevel1;
LONG locked = info.SessionFlags;
wtsFreeMemory(buffer);
// reverse for Windows Server 2008 R2 and Windows 7
if (Environment::isWin7()) {
if (locked == WTS_SESSIONSTATE_UNLOCK) {
return true;
}
return false;
}
if (locked == WTS_SESSIONSTATE_LOCK) {
return true;
}
return false;
}

Expand Down

0 comments on commit ccd30c8

Please sign in to comment.