chiark
/
gitweb
/
~mdw
/
fwd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix stupid bugs from the listen(2) change.
[fwd]
/
socket.c
diff --git
a/socket.c
b/socket.c
index 60d3d841e6cecc00597ff66a9621641bc422b67d..87b3d96742dbaadf24725ace717fe708e488c6a6 100644
(file)
--- a/
socket.c
+++ b/
socket.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-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
*
*
* Socket source and target definitions
*
@@
-29,6
+29,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: socket.c,v $
/*----- 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.
* 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");
sso->listen = atoi(sc->d.buf);
if (sso->listen == 0)
error(sc, "argument of `listen' must be positive");
+ token(sc);
CONF_ACCEPT;
}
CONF_ACCEPT;
}
@@
-607,7
+611,7
@@
static void ssource_attach(source *s, scanner *sc, target *t)
/* --- Set it to listen for connections --- */
/* --- 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));
}
error(sc, "couldn't listen on socket: %s", strerror(errno));
}