[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [PATCH] virt-viewer: Don't hardcode sshport



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 redhat com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]