mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 09:27:59 +00:00
Fix "-v" in the Windows console utilities (plink, pscp, psftp).
I'm not convinced I've done this the right way (I've introduced a static for logctx in console.c) but it will do for now. [originally from svn r2674]
This commit is contained in:
parent
30347e5313
commit
36f133b374
@ -15,6 +15,8 @@
|
||||
|
||||
int console_batch_mode = FALSE;
|
||||
|
||||
static void *console_logctx = NULL;
|
||||
|
||||
/*
|
||||
* Clean up and exit.
|
||||
*/
|
||||
@ -259,8 +261,15 @@ void old_keyfile_warning(void)
|
||||
fputs(message, stderr);
|
||||
}
|
||||
|
||||
void console_provide_logctx(void *logctx)
|
||||
{
|
||||
console_logctx = logctx;
|
||||
}
|
||||
|
||||
void logevent(void *frontend, char *string)
|
||||
{
|
||||
if (console_logctx)
|
||||
log_eventlog(console_logctx, string);
|
||||
}
|
||||
|
||||
int console_get_line(const char *prompt, char *str,
|
||||
|
1
plink.c
1
plink.c
@ -548,6 +548,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
logctx = log_init(NULL, &cfg);
|
||||
back->provide_logctx(backhandle, logctx);
|
||||
console_provide_logctx(logctx);
|
||||
sfree(realhost);
|
||||
}
|
||||
connopen = 1;
|
||||
|
1
psftp.c
1
psftp.c
@ -1836,6 +1836,7 @@ static int psftp_connect(char *userhost, char *user, int portnumber)
|
||||
}
|
||||
logctx = log_init(NULL, &cfg);
|
||||
back->provide_logctx(backhandle, logctx);
|
||||
console_provide_logctx(logctx);
|
||||
ssh_sftp_init();
|
||||
if (verbose && realhost != NULL)
|
||||
printf("Connected to %s\n", realhost);
|
||||
|
1
putty.h
1
putty.h
@ -670,6 +670,7 @@ int askappend(void *frontend, char *filename);
|
||||
*/
|
||||
extern int console_batch_mode;
|
||||
int console_get_line(const char *prompt, char *str, int maxlen, int is_pw);
|
||||
void console_provide_logctx(void *logctx);
|
||||
|
||||
/*
|
||||
* Exports from printing.c.
|
||||
|
1
scp.c
1
scp.c
@ -580,6 +580,7 @@ static void do_cmd(char *host, char *user, char *cmd)
|
||||
bump("ssh_init: %s", err);
|
||||
logctx = log_init(NULL, &cfg);
|
||||
back->provide_logctx(backhandle, logctx);
|
||||
console_provide_logctx(logctx);
|
||||
ssh_scp_init();
|
||||
if (verbose && realhost != NULL)
|
||||
tell_user(stderr, "Connected to %s\n", realhost);
|
||||
|
Loading…
Reference in New Issue
Block a user