From 3525cabf48eb97d2e58a1e715e70fab399d40568 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Wed, 17 Apr 2013 22:48:43 +0800 Subject: Use '#' for host#port separator, document it. This fixes scp in multihop --- cli-runopts.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cli-runopts.c') diff --git a/cli-runopts.c b/cli-runopts.c index a6e2b06..62568b0 100644 --- a/cli-runopts.c +++ b/cli-runopts.c @@ -610,7 +610,11 @@ static void parse_hostname(const char* orighostarg) { 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; -- cgit v1.2.3