Skip to content

Commit

Permalink
Merge pull request #104 from jamesmcm/openvpnbuffer
Browse files Browse the repository at this point in the history
Increase logfile buffer size for OpenVPN
  • Loading branch information
jamesmcm authored Sep 12, 2021
2 parents 6eb823c + 5fdb071 commit 0bd4e64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "vopono"
description = "Launch applications via VPN tunnels using temporary network namespaces"
version = "0.8.4"
version = "0.8.5"
authors = ["James McMurray <[email protected]>"]
edition = "2018"
license = "GPL-3.0-or-later"
Expand Down
3 changes: 1 addition & 2 deletions src/openvpn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl OpenVpn {
.exec_no_block(&command_vec, None, true, false, Some(working_dir))
.context("Failed to launch OpenVPN - is openvpn installed?")?;
let id = handle.id();
let mut buffer = String::with_capacity(1024);
let mut buffer = String::with_capacity(16384);

let mut logfile = BufReader::with_capacity(64, File::open(log_file_str)?);
let mut pos: usize = 0;
Expand Down Expand Up @@ -112,7 +112,6 @@ impl OpenVpn {
}

logfile.seek(SeekFrom::Start(pos as u64)).unwrap();
buffer.clear();
}

if buffer.contains("AUTH_FAILED") {
Expand Down

0 comments on commit 0bd4e64

Please sign in to comment.