tags 637548 +patch

On Fri, Aug 12, 2011 at 04:42:39PM +0200, Guido Günther wrote:
> Hi Luca,
> 
> On Fri, Aug 12, 2011 at 03:23:17PM +0200, Luca Capello wrote:
> > Package: virt-viewer
> > Version: 0.4.0-1
> > Severity: important
> > Tags: upstream
> > Usertags: pca-virtualization
> > 
> > Hi there!
> > 
> > 0.4.0-1 is supposed to solve this issue thanks to:
> > 
> >   
> > <http://anonscm.debian.org/gitweb/?p=pkg-libvirt/virt-viewer.git;a=commitdiff;h=2376c067bd80cf68c425d51982deece3e6129e1a>
> 
> This looks like a brown paper bag for me. It has 
> 
> if (!sshport) 
> 
> while it should have 
> 
> if (sshport)
> 
> in virt-viewer-app.c:322. Sorry for that. I'll roll out a new version
> but will wait for your patch.

The attached patch works for me with:

* no port given
* port specified in .ssh/config
* port given in the URL

Are you seeing any other problems?
Cheers,
 -- Guido
>From 7ea0f0c9368124a50706d0f450a992c122dbd731 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <[email protected]>
Date: Fri, 12 Aug 2011 16:43:10 +0200
Subject: [PATCH] Fix reversed logic for ssh port setting

/me grabs a brown paper bag.
---
 src/virt-viewer-app.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index cf7811e..71284b6 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -319,7 +319,7 @@ virt_viewer_app_open_tunnel_ssh(const char *sshhost,
 	int n = 0;
 
 	cmd[n++] = "ssh";
-	if (!sshport) {
+	if (sshport) {
 		cmd[n++] = "-p";
 		sprintf(portstr, "%d", sshport);
 		cmd[n++] = portstr;
-- 
1.7.5.4

Reply via email to