1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 02:25:28 +03:00

ssh: flatten out session module

This commit is contained in:
Wez Furlong 2021-10-18 07:56:22 -07:00
parent 75f946c22c
commit 1f073db776
6 changed files with 9 additions and 11 deletions

View File

@ -29,7 +29,7 @@ impl AuthenticationEvent {
}
}
impl crate::session::SessionInner {
impl crate::sessioninner::SessionInner {
fn agent_auth(&mut self, sess: &ssh2::Session, user: &str) -> anyhow::Result<bool> {
if let Some(only) = self.config.get("identitiesonly") {
if only == "yes" {

View File

@ -21,7 +21,7 @@ impl HostVerificationEvent {
}
}
impl crate::session::SessionInner {
impl crate::sessioninner::SessionInner {
pub fn host_verification_libssh(
&mut self,
sess: &libssh::Session,

View File

@ -5,6 +5,7 @@ mod filewrap;
mod host;
mod pty;
mod session;
mod sessioninner;
mod sessionwrap;
mod sftp;

View File

@ -1,6 +1,5 @@
use crate::session::{
ChannelId, ChannelInfo, DescriptorState, SessionRequest, SessionSender, SignalChannel,
};
use crate::session::{SessionRequest, SessionSender, SignalChannel};
use crate::sessioninner::{ChannelId, ChannelInfo, DescriptorState};
use crate::sessionwrap::SessionWrap;
use filedescriptor::{socketpair, FileDescriptor};
use portable_pty::{ExitStatus, PtySize};
@ -165,7 +164,7 @@ impl portable_pty::Child for SshChildProcess {
}
}
impl crate::session::SessionInner {
impl crate::sessioninner::SessionInner {
pub fn new_pty(&mut self, sess: &mut SessionWrap, newpty: &NewPty) -> anyhow::Result<()> {
sess.set_blocking(true);

View File

@ -1,9 +1,8 @@
use crate::auth::*;
use crate::channelwrap::ChannelWrap;
use crate::config::ConfigMap;
use crate::host::*;
use crate::pty::*;
pub(crate) use crate::session::inner::*;
use crate::sessioninner::*;
use crate::sftp::{Sftp, SftpRequest};
use filedescriptor::{socketpair, FileDescriptor};
use portable_pty::PtySize;
@ -12,8 +11,6 @@ use std::collections::HashMap;
use std::io::Write;
use std::sync::{Arc, Mutex};
mod inner;
#[derive(Debug)]
pub enum SessionEvent {
Banner(Option<String>),

View File

@ -1,7 +1,8 @@
use crate::channelwrap::ChannelWrap;
use crate::config::ConfigMap;
use crate::filewrap::FileWrap;
use crate::pty::*;
use crate::session::{ChannelWrap, Exec, ExecResult, SessionEvent, SessionRequest, SignalChannel};
use crate::session::{Exec, ExecResult, SessionEvent, SessionRequest, SignalChannel};
use crate::sessionwrap::SessionWrap;
use crate::sftp::{
self, File, FileId, FileRequest, Metadata, SftpChannelError, SftpChannelResult, SftpRequest,