[virt-tools-list] [PATCH] virt-viewer: Don't hardcode sshport
Guido Günther
agx at sigxcpu.org
Fri Jul 29 09:34:57 UTC 2011
Hi,
On Sat, Jul 23, 2011 at 06:30:41PM +0200, Guido Günther wrote:
> this unbreaks using different ports via .ssh/config
can this be applied?
Cheers,
-- Guido
>
> ---
> src/virt-viewer-app.c | 12 +++++-------
> 1 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
> index 687927c..06cde0d 100644
> --- a/src/virt-viewer-app.c
> +++ b/src/virt-viewer-app.c
> @@ -742,14 +742,12 @@ virt_viewer_app_open_tunnel_ssh(const char *sshhost,
> char portstr[50];
> int n = 0;
>
> - if (!sshport)
> - sshport = 22;
> -
> - sprintf(portstr, "%d", sshport);
> -
> cmd[n++] = "ssh";
> - cmd[n++] = "-p";
> - cmd[n++] = portstr;
> + if (!sshport) {
> + cmd[n++] = "-p";
> + sprintf(portstr, "%d", sshport);
> + cmd[n++] = portstr;
> + }
> if (sshuser) {
> cmd[n++] = "-l";
> cmd[n++] = sshuser;
> --
> 1.7.5.4
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
>
More information about the virt-tools-list
mailing list