22.214.171.124 Application Requests an SMB Session Logoff
The application MUST provide the Client.Session of the SMB session to be closed.
The client MUST traverse the Client.Connection.TreeConnectTable, and for each entry in which Client.TreeConnect.Session matches the application-provided Client.Session, the TreeConnect MUST be closed, as specified in section 126.96.36.199.
The client MUST construct an SMB_COM_LOGOFF_ANDX Request (section 188.8.131.52.1). The request MUST be sent to the server as specified in section 184.108.40.206. The user represented by the Client.Session.SessionUID value, presented in the SMB Header (section 220.127.116.11), is logged off as follows:
The server cancels any outstanding command requests for this UID.
The server releases all locks and closes all files opened by this UID; the associated FIDs are invalidated.
The server closes all searches currently held open by this UID; the associated SIDs are invalidated.
The server disconnects all tree connects created by this UID; the associated TIDs are invalidated.
The server invalidates the UID.