Diff

Differences From Artifact [cf1b2b2275]:

To Artifact [9f0a2cc2a2]:


3415
3416
3417
3418
3419
3420
3421
3422


3423
3424
3425

3426
3427
3428
3429
3430
3431
3432
3415
3416
3417
3418
3419
3420
3421

3422
3423
3424
3425

3426
3427
3428
3429
3430
3431
3432
3433







-
+
+


-
+







        char *colon;

        tmphost = dupstr(loghost);
	ssh->savedport = 22;	       /* default ssh port */

	/*
	 * A colon suffix on the hostname string also lets us affect
	 * savedport.
	 * savedport. (Unless there are multiple colons, in which case
	 * we assume this is an unbracketed IPv6 literal.)
	 */
	colon = host_strrchr(tmphost, ':');
	if (colon) {
	if (colon && colon == host_strchr(tmphost, ':')) {
	    *colon++ = '\0';
	    if (*colon)
		ssh->savedport = atoi(colon);
	}

        ssh->savedhost = host_strduptrim(tmphost);
        sfree(tmphost);