Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2014 09:26: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-9@freebsd.org
Subject:   svn commit: r262288 - stable/9/usr.sbin/ppp
Message-ID:  <201402210926.s1L9QqJf057321@svn.freebsd.org>

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

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

Modified: stable/9/usr.sbin/ppp/chat.c
==============================================================================
--- stable/9/usr.sbin/ppp/chat.c	Fri Feb 21 09:25:52 2014	(r262287)
+++ stable/9/usr.sbin/ppp/chat.c	Fri Feb 21 09:26:51 2014	(r262288)
@@ -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?201402210926.s1L9QqJf057321>