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;
   }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to