Skip to content

Commit

Permalink
Add back some verbose output
Browse files Browse the repository at this point in the history
  • Loading branch information
vinc committed Jul 16, 2023
1 parent 9554b2b commit 7d01eb2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/usr/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,18 @@ pub fn main(args: &[&str]) -> Result<(), ExitCode> {
syscall::close(handle);
return Err(ExitCode::Failure);
}

if verbose {
debug!("Listening to {}:{}", addr, port);
}
} else {
if syscall::connect(handle, addr, port).is_err() {
error!("Could not connect to {}:{}", addr, port);
syscall::close(handle);
return Err(ExitCode::Failure);
}
if verbose {
debug!("Connected to {}:{}", addr, port);
}
}

loop {
Expand Down
3 changes: 3 additions & 0 deletions src/usr/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ pub fn main(args: &[&str]) -> Result<(), ExitCode> {
syscall::close(handle);
return Err(ExitCode::Failure);
}
if verbose {
debug!("Connected to {}:{}", addr, port);
}
loop {
if sys::console::end_of_text() || sys::console::end_of_transmission() {
eprintln!();
Expand Down

0 comments on commit 7d01eb2

Please sign in to comment.