1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Prompt correctly when ppp *doesn't* ask for a password.

This commit is contained in:
Brian Somers 1997-11-09 18:50:34 +00:00
parent 10f2eeb1d5
commit 2d77cf0b00
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=31079

View File

@ -79,17 +79,18 @@ Receive(int fd, unsigned TimeoutVal, int display)
Result = -1;
break;
} else if (len > 2 && !strcmp(Buffer+len-2, "> ")) {
prompt = strrchr(Buffer, '\n');
if (display & (REC_SHOW|REC_VERBOSE)) {
if (display & REC_VERBOSE)
last = Buffer+len-1;
else
last = strrchr(Buffer, '\n');
last = prompt;
if (last) {
last++;
write(1, Buffer, last-Buffer);
prompt = last;
}
}
prompt = prompt == NULL ? Buffer : prompt+1;
for (last = Buffer+len-2; last > Buffer && *last != ' '; last--)
;
if (last > Buffer+3 && !strncmp(last-3, " on", 3)) {