aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-05-07 20:20:20 +0200
committerJoe <rbo@gmx.us>2024-05-07 20:20:20 +0200
commitfaa4de4a0c187cca6aa9faf0cf403266a9738f76 (patch)
treefec7edb42e7397ba029b63469ef25a08d7f025ea
parentfix (diff)
downloadhardflip-faa4de4a0c187cca6aa9faf0cf403266a9738f76.tar.gz
hardflip-faa4de4a0c187cca6aa9faf0cf403266a9738f76.tar.bz2
hardflip-faa4de4a0c187cca6aa9faf0cf403266a9738f76.tar.xz
hardflip-faa4de4a0c187cca6aa9faf0cf403266a9738f76.tar.zst
hardflip-faa4de4a0c187cca6aa9faf0cf403266a9738f76.zip
fix
-rw-r--r--src/c_exec.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/c_exec.go b/src/c_exec.go
index 5afca7a..eb711cd 100644
--- a/src/c_exec.go
+++ b/src/c_exec.go
@@ -265,6 +265,7 @@ func c_exec(host *HostNode, opts HardOpts, ui *HardUI) {
if host == nil {
return
}
+ save_host, save_port := host.Host, host.Port
tmp_host := host
if host.Protocol == PROTOCOL_RDP && len(host.Jump.Host) != 0 {
local_host := "127.0.0.1"
@@ -277,6 +278,10 @@ func c_exec(host *HostNode, opts HardOpts, ui *HardUI) {
tmp_host.Port = local_port
}
cmd_fmt, cmd_env := c_format_cmd(tmp_host, opts, ui)
+ if tmp_host.Port != save_port {
+ tmp_host.Host = save_host
+ tmp_host.Port = save_port
+ }
if cmd_fmt == nil {
return
}