Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2014 09:25:52 +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-10@freebsd.org
Subject:   svn commit: r262287 - stable/10/usr.sbin/ppp
Message-ID:  <201402210925.s1L9PqvT057162@svn.freebsd.org>

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

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/10/usr.sbin/ppp/chat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/ppp/chat.c
==============================================================================
--- stable/10/usr.sbin/ppp/chat.c	Fri Feb 21 09:22:37 2014	(r262286)
+++ stable/10/usr.sbin/ppp/chat.c	Fri Feb 21 09:25:52 2014	(r262287)
@@ -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?201402210925.s1L9PqvT057162>