diff --git a/kernel/src/arch/hosted/mod.rs b/kernel/src/arch/hosted/mod.rs index c92f600ae..de369dbd0 100644 --- a/kernel/src/arch/hosted/mod.rs +++ b/kernel/src/arch/hosted/mod.rs @@ -50,10 +50,10 @@ fn handle_connection(mut conn: TcpStream, pid: PID, chn: Sender<(PID, SysCall)>) match call { Err(e) => println!("Received invalid syscall: {:?}", e), Ok(call) => { - println!( - "Received packet: {:08x} {} {} {} {} {} {} {}: {:?}", - pkt[0], pkt[1], pkt[2], pkt[3], pkt[4], pkt[5], pkt[6], pkt[7], call - ); + // println!( + // "Received packet: {:08x} {} {} {} {} {} {} {}: {:?}", + // pkt[0], pkt[1], pkt[2], pkt[3], pkt[4], pkt[5], pkt[6], pkt[7], call + // ); chn.send((pid, call)).expect("couldn't make syscall"); } } @@ -78,7 +78,6 @@ fn listen_thread(address: Option, chn: Sender<(PID, SysCall)>, quit: Rec loop { match listener.accept() { Ok((conn, addr)) => { - println!("New client connected from {}", addr); let thr_chn = chn.clone(); let new_pid = { @@ -86,7 +85,7 @@ fn listen_thread(address: Option, chn: Sender<(PID, SysCall)>, quit: Rec ss.spawn_process(process::ProcessInit::new(conn.try_clone().unwrap()), ()) .unwrap() }; - println!("Assigned PID {}", new_pid); + println!("New client connected from {} and assigned PID {}", addr, new_pid); let conn_copy = conn.try_clone().expect("couldn't duplicate connection"); let jh = spawn(move || handle_connection(conn, new_pid, thr_chn)); clients.push((jh, conn_copy)); @@ -97,14 +96,11 @@ fn listen_thread(address: Option, chn: Sender<(PID, SysCall)>, quit: Rec continue; } x => { - println!("Got shutdown indicator: {:?}", x); for (jh, conn) in clients { use std::net::Shutdown; - eprintln!("Shutting down client..."); conn.shutdown(Shutdown::Both).expect("couldn't shutdown client"); jh.join().expect("couldn't join client thread"); } - eprintln!("Done shutting down everything"); return; } } diff --git a/xous-rs/src/hosted/mod.rs b/xous-rs/src/hosted/mod.rs index a99ee40a4..9c86d87c7 100644 --- a/xous-rs/src/hosted/mod.rs +++ b/xous-rs/src/hosted/mod.rs @@ -5,7 +5,7 @@ use std::mem::size_of; use std::net::TcpStream; use std::sync::Mutex; -use crate::{Result, SysCall}; +use crate::Result; lazy_static! { pub static ref XOUS_SERVER_CONNECTION: Mutex> = Mutex::new(None); @@ -48,10 +48,10 @@ pub fn _xous_syscall_to( ret: &mut Result, xsc: &mut TcpStream, ) { - print!( - "Making Syscall: {:?}", - SysCall::from_args(nr, a1, a2, a3, a4, a5, a6, a7).unwrap() - ); + // print!( + // "Making Syscall: {:?}", + // SysCall::from_args(nr, a1, a2, a3, a4, a5, a6, a7).unwrap() + // ); // Send the packet to the server for word in &[nr, a1, a2, a3, a4, a5, a6, a7] { @@ -68,9 +68,9 @@ pub fn _xous_syscall_to( } *ret = Result::from_args(pkt); - println!(" Response: {:?}", *ret); + // println!(" Response: {:?}", *ret); if Result::BlockedProcess == *ret { - println!(" Waiting again"); + // println!(" Waiting again"); } else { return; }