Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2014 09:27:48 +0000 (UTC)
From:      Christian Brueffer <brueffer@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r262289 - stable/8/usr.sbin/ppp
Message-ID:  <201402210927.s1L9Rmj1057472@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brueffer
Date: Fri Feb 21 09:27:48 2014
New Revision: 262289
URL: http://svnweb.freebsd.org/changeset/base/262289

Log:
  MFC: r261900
  
  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

Modified:
  stable/8/usr.sbin/ppp/chat.c
Directory Properties:
  stable/8/usr.sbin/ppp/   (props changed)

Modified: stable/8/usr.sbin/ppp/chat.c
==============================================================================
--- stable/8/usr.sbin/ppp/chat.c	Fri Feb 21 09:26:51 2014	(r262288)
+++ stable/8/usr.sbin/ppp/chat.c	Fri Feb 21 09:27:48 2014	(r262289)
@@ -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?201402210927.s1L9Rmj1057472>