mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-02-04 14:12:24 +00:00
Stop the "Sent username %s" message coming up twice in pscp -v
[originally from svn r772]
This commit is contained in:
parent
2c9c817895
commit
696400a672
12
ssh.c
12
ssh.c
@ -1255,20 +1255,20 @@ static int do_ssh1_login(unsigned char *in, int inlen, int ispkt)
|
|||||||
c_write("\r\n", 2);
|
c_write("\r\n", 2);
|
||||||
username[strcspn(username, "\n\r")] = '\0';
|
username[strcspn(username, "\n\r")] = '\0';
|
||||||
} else {
|
} else {
|
||||||
char stuff[200];
|
|
||||||
strncpy(username, cfg.username, 99);
|
strncpy(username, cfg.username, 99);
|
||||||
username[99] = '\0';
|
username[99] = '\0';
|
||||||
if ((flags & FLAG_VERBOSE) || (flags & FLAG_INTERACTIVE)) {
|
|
||||||
sprintf(stuff, "Sent username \"%s\".\r\n", username);
|
|
||||||
c_write(stuff, strlen(stuff));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
send_packet(SSH1_CMSG_USER, PKT_STR, username, PKT_END);
|
send_packet(SSH1_CMSG_USER, PKT_STR, username, PKT_END);
|
||||||
{
|
{
|
||||||
char userlog[20+sizeof(username)];
|
char userlog[22+sizeof(username)];
|
||||||
sprintf(userlog, "Sent username \"%s\"", username);
|
sprintf(userlog, "Sent username \"%s\"", username);
|
||||||
logevent(userlog);
|
logevent(userlog);
|
||||||
|
if (flags & FLAG_INTERACTIVE &&
|
||||||
|
(!((flags & FLAG_STDERR) && (flags & FLAG_VERBOSE)))) {
|
||||||
|
strcat(userlog, "\r\n");
|
||||||
|
c_write(userlog, strlen(userlog));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user