From 1784fc860993abe3be744567e267b68219d975bb Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 3 Dec 2021 22:39:18 -0800 Subject: [PATCH] Use forced IP for the transfer if there is one --- web-lib-funcs.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index e19b056e6..cb76bd00d 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -7264,7 +7264,7 @@ my $rv = &remote_rpc_call($host, { 'action' => 'tcpwrite', 'file' => $remotefile, 'name' => $remotebase } ); my $error; -my $serv = ref($host) ? $host->{'host'} : $host; +my $serv = !ref($host) ? $host : ($host->{'ip'} || $host->{'host'}); &open_socket($serv || "localhost", $rv->[1], TWRITE, \$error); return &$main::remote_error_handler("Failed to transfer file : $error") if ($error); @@ -7302,7 +7302,7 @@ if (!$rv->[0]) { return &$main::remote_error_handler("Failed to transfer file : $rv->[1]"); } my $error; -my $serv = ref($host) ? $host->{'host'} : $host; +my $serv = !ref($host) ? $host : ($host->{'ip'} || $host->{'host'}); &open_socket($serv || "localhost", $rv->[1], TREAD, \$error); return &$main::remote_error_handler("Failed to transfer file : $error") if ($error);