diff options
author | Christian Brueffer <brueffer@FreeBSD.org> | 2014-02-14 20:34:24 +0000 |
---|---|---|
committer | Christian Brueffer <brueffer@FreeBSD.org> | 2014-02-14 20:34:24 +0000 |
commit | 2df958167e8dcff2df0f247ef20858076765505a (patch) | |
tree | 7007c76671b9e572fded2d4408931cfbc16aa871 /usr.sbin/ppp | |
parent | b3448df413027d8b19605d629cf9fb668da1d519 (diff) | |
download | src-2df958167e8dcff2df0f247ef20858076765505a.tar.gz src-2df958167e8dcff2df0f247ef20858076765505a.zip |
In chat_UpdateSet(), initialize the input buffer to prevent stale data
from previous timed out commands.
PR: 186530
Submitted by: Alexander Zagrebin <alexz at visp.ru>
Reviewed by: brian
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=261900
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/chat.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c index 04b267929780..daa52cd85a05 100644 --- a/usr.sbin/ppp/chat.c +++ b/usr.sbin/ppp/chat.c @@ -154,6 +154,11 @@ chat_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n) else { /* c->state = CHAT_EXPECT; */ c->argptr = &arg_term; + /* + We have to clear the input buffer, because it contains output + from the previous (timed out) command. + */ + c->bufstart = c->bufend; } c->TimedOut = 0; } |