mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
Adjust the semantics of cfg.remote_cmd_ptr: it is now NULL when
cfg.remote_cmd is to be used, rather than actually pointing at cfg.remote_cmd. This change restores the ability to structure-copy Configs without breaking them. (Though of course this is only a temporary solution: really what wants doing is to fix `config-struct'.) [originally from svn r5335]
This commit is contained in:
3
ssh.c
3
ssh.c
@ -4618,6 +4618,8 @@ static void do_ssh1_connection(Ssh ssh, unsigned char *in, int inlen,
|
||||
*/
|
||||
{
|
||||
char *cmd = ssh->cfg.remote_cmd_ptr;
|
||||
|
||||
if (!cmd) cmd = ssh->cfg.remote_cmd;
|
||||
|
||||
if (ssh->cfg.ssh_subsys && ssh->cfg.remote_cmd_ptr2) {
|
||||
cmd = ssh->cfg.remote_cmd_ptr2;
|
||||
@ -7323,6 +7325,7 @@ static void do_ssh2_authconn(Ssh ssh, unsigned char *in, int inlen,
|
||||
} else {
|
||||
subsys = ssh->cfg.ssh_subsys;
|
||||
cmd = ssh->cfg.remote_cmd_ptr;
|
||||
if (!cmd) cmd = ssh->cfg.remote_cmd;
|
||||
}
|
||||
|
||||
s->pktout = ssh2_pkt_init(SSH2_MSG_CHANNEL_REQUEST);
|
||||
|
Reference in New Issue
Block a user