summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/server.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-06-24 19:33:36 +0000
committerbrian <brian@FreeBSD.org>1998-06-24 19:33:36 +0000
commit7c567ca3f8ef3ab5a1e088fbf86a9b1cd2e6718e (patch)
treecb27c2021e7933ab6a8a0c8a33e27883241617a8 /usr.sbin/ppp/server.c
parentbe4ceaedbf3a7a77628a0d38a412cd66fbcab341 (diff)
downloadFreeBSD-src-7c567ca3f8ef3ab5a1e088fbf86a9b1cd2e6718e.zip
FreeBSD-src-7c567ca3f8ef3ab5a1e088fbf86a9b1cd2e6718e.tar.gz
o If we come out of select() with only write descriptors that
end up writing zero bytes, sleep for 1/10 of a second so that we don't end up using up too much cpu. This should only ever happen on systems that wrongly report a descriptor as writable despite the tty buffer being full. Discussed with: Jeff Evarts o Do an initial run-time check to see if select() alters the passed timeval. This knowledge isn't yet used, but will be soon.
Diffstat (limited to 'usr.sbin/ppp/server.c')
-rw-r--r--usr.sbin/ppp/server.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/server.c b/usr.sbin/ppp/server.c
index a780319..b8dd938 100644
--- a/usr.sbin/ppp/server.c
+++ b/usr.sbin/ppp/server.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: server.c,v 1.19 1998/05/23 22:24:50 brian Exp $
+ * $Id: server.c,v 1.20 1998/06/16 19:40:41 brian Exp $
*/
#include <sys/types.h>
@@ -175,11 +175,12 @@ server_Read(struct descriptor *d, struct bundle *bundle, const fd_set *fdset)
descriptor_Read(&p->desc, bundle, fdset);
}
-static void
+static int
server_Write(struct descriptor *d, struct bundle *bundle, const fd_set *fdset)
{
/* We never want to write here ! */
log_Printf(LogALERT, "server_Write: Internal error: Bad call !\n");
+ return 0;
}
struct server server = {
OpenPOWER on IntegriCloud