comparison 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
comparison
equal deleted inserted replaced
782:e0084f136cb8 783:34e69908b3f7
608 608
609 if (cli_opts.username == NULL) { 609 if (cli_opts.username == NULL) {
610 cli_opts.username = m_strdup(cli_opts.own_user); 610 cli_opts.username = m_strdup(cli_opts.own_user);
611 } 611 }
612 612
613 port = strchr(cli_opts.remotehost, '/'); 613 port = strchr(cli_opts.remotehost, '#');
614 if (!port) {
615 // legacy separator
616 port = strchr(cli_opts.remotehost, '/');
617 }
614 if (port) { 618 if (port) {
615 *port = '\0'; 619 *port = '\0';
616 cli_opts.remoteport = port+1; 620 cli_opts.remoteport = port+1;
617 } 621 }
618 622