[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



On 07/29/2011 05:34 AM, Guido Günther wrote:
> 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;

ACK to the patch, I don't have commit access though. cc-ing Dan

Thanks,
Cole


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