Mercurial > dropbear
diff cli-runopts.c @ 783:34e69908b3f7
Use '#' for host#port separator, document it. This fixes scp
in multihop
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 17 Apr 2013 22:48:43 +0800 |
parents | f7c8b786e595 |
children | 0e5ea6812bb7 |
line wrap: on
line diff
--- a/cli-runopts.c Wed Apr 17 22:29:18 2013 +0800 +++ b/cli-runopts.c Wed Apr 17 22:48:43 2013 +0800 @@ -610,7 +610,11 @@ cli_opts.username = m_strdup(cli_opts.own_user); } - port = strchr(cli_opts.remotehost, '/'); + port = strchr(cli_opts.remotehost, '#'); + if (!port) { + // legacy separator + port = strchr(cli_opts.remotehost, '/'); + } if (port) { *port = '\0'; cli_opts.remoteport = port+1;