Skip to content

Commit

Permalink
SMB2Client: Minor code readability improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
TalAloni committed Jan 10, 2025
1 parent ffacfa5 commit 143c23c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SMBLibrary/Client/SMB2Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@ public NTStatus Login(IAuthenticationClient authenticationClient)
response = WaitForCommand(request.MessageID);
}

if (response is SessionSetupResponse)
if (response is SessionSetupResponse finalSessionSetupResponse)
{
m_isLoggedIn = (response.Header.Status == NTStatus.STATUS_SUCCESS);
if (m_isLoggedIn)
{
m_sessionKey = authenticationClient.GetSessionKey();
SessionFlags sessionFlags = ((SessionSetupResponse)response).SessionFlags;
SessionFlags sessionFlags = finalSessionSetupResponse.SessionFlags;
if ((sessionFlags & SessionFlags.IsGuest) > 0)
{
// [MS-SMB2] 3.2.5.3.1 If the SMB2_SESSION_FLAG_IS_GUEST bit is set in the SessionFlags field of the SMB2
Expand Down

0 comments on commit 143c23c

Please sign in to comment.