Date: Fri, 14 Feb 2014 20:34:24 +0000 (UTC) From: Christian Brueffer <brueffer@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261900 - head/usr.sbin/ppp Message-ID: <201402142034.s1EKYOob022423@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402142034.s1EKYOob022423>