]> git.proxmox.com Git - pve-storage.git/commitdiff
storage_migrate: only set errfunc for send stream
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 5 Feb 2020 08:37:09 +0000 (09:37 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 5 Feb 2020 08:37:09 +0000 (09:37 +0100)
since we redirect the output to our (insecure) socket, logfunc is only
used for STDERR anyway, so we might as well make it explicit on the
caller side.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/Storage.pm

index 2b292f6d395423bfc3e7306ba9a57a174c6c6597..62d72deaa2ab398f2f1e9d1575a7b75ab47cdf21 100755 (executable)
@@ -626,7 +626,7 @@ sub storage_migrate {
                or die "failed to connect to tunnel at $ip:$port\n";
            # we won't be reading from the socket
            shutdown($socket, 0);
-           run_command([$send, @cstream], output => '>&'.fileno($socket), logfunc => $logfunc);
+           run_command([$send, @cstream], output => '>&'.fileno($socket), errfunc => $logfunc);
            # don't close the connection entirely otherwise the receiving end
            # might not get all buffered data (and fails with 'connection reset by peer')
            shutdown($socket, 1);