internal static SMBCommand GetCloseResponse(SMBHeader header, CloseRequest request, StateObject state) { string openedFilePath = state.GetOpenedFilePath(request.FID); if (openedFilePath == null) { header.Status = NTStatus.STATUS_SMB_BAD_FID; return(new ErrorResponse(CommandName.SMB_COM_CLOSE)); } state.RemoveOpenedFile(request.FID); CloseResponse response = new CloseResponse(); return(response); }