summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/chat.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-10-27 22:53:25 +0000
committerbrian <brian@FreeBSD.org>1998-10-27 22:53:25 +0000
commit95a128b95548dd572048740ab65598edf3870385 (patch)
tree2ffc530d8151cb2106600d21f4301c204b2fe189 /usr.sbin/ppp/chat.c
parent4e483e71e2e95ad274f3a88b0cc7cdf1d5290bc5 (diff)
downloadFreeBSD-src-95a128b95548dd572048740ab65598edf3870385.zip
FreeBSD-src-95a128b95548dd572048740ab65598edf3870385.tar.gz
Untimeout the chat expect timer as soon as we get a
match - otherwise, with a delayed (\\d) ``send'', the timeout may happen during the send and cause a failure. Problem reported by: David L. Vondrasek <dallas.tx@airmail.net>
Diffstat (limited to 'usr.sbin/ppp/chat.c')
-rw-r--r--usr.sbin/ppp/chat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c
index fa81677..8c41aa2 100644
--- a/usr.sbin/ppp/chat.c
+++ b/usr.sbin/ppp/chat.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: chat.c,v 1.50 1998/06/27 14:18:01 brian Exp $
+ * $Id: chat.c,v 1.51 1998/08/07 18:42:47 brian Exp $
*/
#include <sys/types.h>
@@ -429,6 +429,7 @@ chat_Read(struct descriptor *d, struct bundle *bundle, const fd_set *fdset)
if (begin >= ebegin && begin < eend &&
!strncmp(begin, c->argptr, c->arglen)) {
/* Got it ! */
+ timer_Stop(&c->timeout);
if (memchr(begin + c->arglen - 1, '\n',
c->bufend - begin - c->arglen + 1) == NULL) {
/* force it into the log */
OpenPOWER on IntegriCloud