summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/chat.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2002-03-30 12:30:09 +0000
committerbrian <brian@FreeBSD.org>2002-03-30 12:30:09 +0000
commitee9763124d8cbeceba9f2194f3ea61c1f2c1d362 (patch)
treeb285f7b912098d74c02bd2a8b542e1472a52003a /usr.sbin/ppp/chat.c
parentef538de24ea069ff6846f7363f8a329a92cf1aa1 (diff)
downloadFreeBSD-src-ee9763124d8cbeceba9f2194f3ea61c1f2c1d362.zip
FreeBSD-src-ee9763124d8cbeceba9f2194f3ea61c1f2c1d362.tar.gz
Merge the NETGRAPH branch into HEAD. tty devices now use netgraph's line
discipline to do the async escaping, but no other benefits are available yet. Change ``ifdef HAVE_DES'' to ``ifndef NODES'' for consistency. Make the Makefile a little more sane WRT RELEASE_CRUNCH.
Diffstat (limited to 'usr.sbin/ppp/chat.c')
-rw-r--r--usr.sbin/ppp/chat.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c
index a81ab0e..3bd3bae 100644
--- a/usr.sbin/ppp/chat.c
+++ b/usr.sbin/ppp/chat.c
@@ -516,10 +516,12 @@ chat_Write(struct fdescriptor *d, struct bundle *bundle, const fd_set *fdset)
}
wrote = physical_Write(c->physical, c->argptr, c->arglen);
- result = wrote ? 1 : 0;
+ result = wrote > 0 ? 1 : 0;
if (wrote == -1) {
- if (errno != EINTR)
- log_Printf(LogERROR, "chat_Write: %s\n", strerror(errno));
+ if (errno != EINTR) {
+ log_Printf(LogWARN, "chat_Write: %s\n", strerror(errno));
+ result = -1;
+ }
if (physical_IsSync(c->physical)) {
c->argptr += 2;
c->arglen -= 2;
OpenPOWER on IntegriCloud