svn commit: r261900 - head/usr.sbin/ppp
Christian Brueffer
brueffer at FreeBSD.org
Fri Feb 14 20:34:25 UTC 2014
Author: brueffer
Date: Fri Feb 14 20:34:24 2014
New Revision: 261900
URL: http://svnweb.freebsd.org/changeset/base/261900
Log:
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
Modified:
head/usr.sbin/ppp/chat.c
Modified: head/usr.sbin/ppp/chat.c
==============================================================================
--- head/usr.sbin/ppp/chat.c Fri Feb 14 20:11:06 2014 (r261899)
+++ head/usr.sbin/ppp/chat.c Fri Feb 14 20:34:24 2014 (r261900)
@@ -154,6 +154,11 @@ chat_UpdateSet(struct fdescriptor *d, fd
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;
}
More information about the svn-src-head
mailing list