/* -*-c-*-
*
- * $Id: socket.c,v 1.3 1999/10/22 22:48:36 mdw Exp $
+ * $Id: socket.c,v 1.5 2000/03/23 23:20:42 mdw Exp $
*
* Socket source and target definitions
*
/*----- Revision history --------------------------------------------------*
*
* $Log: socket.c,v $
+ * Revision 1.5 2000/03/23 23:20:42 mdw
+ * Remove listener even if connection option isn't SOCKOPT_LIMITED.
+ *
+ * Revision 1.4 1999/12/22 15:44:25 mdw
+ * Fix log message.
+ *
* Revision 1.3 1999/10/22 22:48:36 mdw
* New connection options: unlimited concurrent connections, and one-shot
* listening sockets.
/* --- Bind it to the right port --- */
if (bind(fd, &ga->sa, ga->a.sz)) {
- fw_log(-1, "[%s] couldn't bind to %s: %s", ss->s.desc, strerror(errno));
+ fw_log(-1, "[%s] couldn't bind socket: %s", ss->s.desc, strerror(errno));
goto fail_1;
}
if (ga->a.ops->bound)
{
ssource *ss = (ssource *)s;
- if (ss->o.conn) {
+ if (ss->o.conn || ss->o.opt != SOCKOPT_LIMIT) {
sel_rmfile(&ss->r);
close(ss->r.fd);
if (ss->a->ops->unbind)