mirror of
https://github.com/microsoft/WSL.git
synced 2025-12-10 17:47:59 -06:00
WSLA session updates and CMake code fix
This commit is contained in:
parent
12f12c41c2
commit
0bdbc3fe55
@ -182,6 +182,16 @@ void WSLASession::ConfigureStorage(const WSLA_SESSION_SETTINGS& Settings)
|
||||
deleteVhdOnFailure.release();
|
||||
}
|
||||
|
||||
const std::wstring& WSLASession::DisplayName() const
|
||||
{
|
||||
return m_displayName;
|
||||
}
|
||||
|
||||
ULONG WSLASession::GetId() const noexcept
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
void WSLASession::CopyDisplayName(_Out_writes_z_(bufferLength) PWSTR buffer, size_t bufferLength) const
|
||||
{
|
||||
THROW_HR_IF(E_BOUNDS, m_displayName.size() + 1 > bufferLength);
|
||||
|
||||
@ -27,15 +27,9 @@ public:
|
||||
|
||||
~WSLASession();
|
||||
|
||||
ULONG GetId() const noexcept
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
ULONG GetId() const noexcept;
|
||||
|
||||
const std::wstring& GetDisplayName() const noexcept
|
||||
{
|
||||
return m_displayName;
|
||||
}
|
||||
const std::wstring& DisplayName() const;
|
||||
|
||||
void CopyDisplayName(_Out_writes_z_(bufferLength) PWSTR buffer, size_t bufferLength) const;
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ HRESULT WSLAUserSessionImpl::OpenSessionByName(LPCWSTR DisplayName, IWSLASession
|
||||
// TODO: Check for duplicate on session creation.
|
||||
for (auto& e : m_sessions)
|
||||
{
|
||||
if (e->GetDisplayName() == DisplayName)
|
||||
if (e->DisplayName() == DisplayName)
|
||||
{
|
||||
THROW_IF_FAILED(e->QueryInterface(__uuidof(IWSLASession), (void**)Session));
|
||||
return S_OK;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user