From: mdw Date: Sat, 23 Feb 2002 00:08:00 +0000 (+0000) Subject: Fix stupid bugs from the listen(2) change. X-Git-Tag: 1.2.6~5 X-Git-Url: https://git.distorted.org.uk/~mdw/fwd/commitdiff_plain/fed9ddde71db87a23d0fda6be6f7631d1a5207bf Fix stupid bugs from the listen(2) change. --- diff --git a/socket.c b/socket.c index 60d3d84..87b3d96 100644 --- a/socket.c +++ b/socket.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: socket.c,v 1.8 2002/02/22 23:44:44 mdw Exp $ + * $Id: socket.c,v 1.9 2002/02/23 00:08:00 mdw Exp $ * * Socket source and target definitions * @@ -29,6 +29,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: socket.c,v $ + * Revision 1.9 2002/02/23 00:08:00 mdw + * Fix stupid bugs from the listen(2) change. + * * Revision 1.8 2002/02/22 23:44:44 mdw * Call @xfree@ rather than @free@. Add option to change the listen(2) * parameter. @@ -351,6 +354,7 @@ static int ssource_option(source *s, scanner *sc) sso->listen = atoi(sc->d.buf); if (sso->listen == 0) error(sc, "argument of `listen' must be positive"); + token(sc); CONF_ACCEPT; } @@ -607,7 +611,7 @@ static void ssource_attach(source *s, scanner *sc, target *t) /* --- Set it to listen for connections --- */ - if (listen(fd, 5)) + if (listen(fd, ss->o.listen)) error(sc, "couldn't listen on socket: %s", strerror(errno)); }