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'.)
git-svn-id: svn://svn.tartarus.org/sgt/putty@5335
cda61777-01e9-0310-a592-
d414129be87e
/* If at this point we have a valid session, go! */
if (*cfg2.host) {
*cfg = cfg2; /* structure copy */
/* If at this point we have a valid session, go! */
if (*cfg2.host) {
*cfg = cfg2; /* structure copy */
- cfg->remote_cmd_ptr = cfg->remote_cmd; /* nasty */
+ cfg->remote_cmd_ptr = NULL;
dlg_end(dlg, 1);
} else
dlg_beep(dlg);
dlg_end(dlg, 1);
} else
dlg_beep(dlg);
char prot[10];
cfg->ssh_subsys = 0; /* FIXME: load this properly */
char prot[10];
cfg->ssh_subsys = 0; /* FIXME: load this properly */
- cfg->remote_cmd_ptr = cfg->remote_cmd;
+ cfg->remote_cmd_ptr = NULL;
cfg->remote_cmd_ptr2 = NULL;
if (do_host) {
cfg->remote_cmd_ptr2 = NULL;
if (do_host) {
*/
{
char *cmd = ssh->cfg.remote_cmd_ptr;
*/
{
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;
if (ssh->cfg.ssh_subsys && ssh->cfg.remote_cmd_ptr2) {
cmd = ssh->cfg.remote_cmd_ptr2;
} else {
subsys = ssh->cfg.ssh_subsys;
cmd = ssh->cfg.remote_cmd_ptr;
} 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);
}
s->pktout = ssh2_pkt_init(SSH2_MSG_CHANNEL_REQUEST);