diff options
author | Brian Somers <brian@FreeBSD.org> | 2000-10-09 22:49:44 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 2000-10-09 22:49:44 +0000 |
commit | b2c374decbc3ed1ad39429b3213078a1fcdb0bb3 (patch) | |
tree | 70ae643eb6340c78f40c375830898f626e07e456 /usr.sbin/ppp/physical.c | |
parent | 8a52f3ecfea1d710cf323ca3dc1f0480e3868d66 (diff) | |
download | src-b2c374decbc3ed1ad39429b3213078a1fcdb0bb3.tar.gz src-b2c374decbc3ed1ad39429b3213078a1fcdb0bb3.zip |
If write() gives -1/ENOBUFS, keep the packet and sleep for 1/10th
of a second before attempting to write it again (unless there's
something else to do instead).
Notes
Notes:
svn path=/head/; revision=66900
Diffstat (limited to 'usr.sbin/ppp/physical.c')
-rw-r--r-- | usr.sbin/ppp/physical.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/physical.c b/usr.sbin/ppp/physical.c index e605131397ab..c0979a98c299 100644 --- a/usr.sbin/ppp/physical.c +++ b/usr.sbin/ppp/physical.c @@ -408,12 +408,13 @@ physical_DescriptorWrite(struct fdescriptor *d, struct bundle *bundle, p->out = m_free(p->out); result = 1; } else if (nw < 0) { - if (errno != EAGAIN) { + if (errno == EAGAIN) + result = 1; + else if (errno != ENOBUFS) { log_Printf(LogPHASE, "%s: write (%d): %s\n", p->link.name, p->fd, strerror(errno)); datalink_Down(p->dl, CLOSE_NORMAL); } - result = 1; } /* else we shouldn't really have been called ! select() is broken ! */ } |