*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
/** \file send_common.c Functions used by more than one paraslash sender. */
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
/** \file send_common.c Functions used by more than one paraslash sender. */
- int fd, ret = para_listen(AF_UNSPEC, l4type, port);
+ int fd, ret = para_listen_simple(l4type, port);
{
char *clnts = NULL, *ret;
struct sender_client *sc, *tmp_sc;
{
char *clnts = NULL, *ret;
struct sender_client *sc, *tmp_sc;
"\tnumber of connected clients: %d\n"
"\tmaximal number of clients: %d%s\n"
"\tconnected clients: %s\n"
"\taccess %s list: %s\n",
name,
(ss->listen_fd >= 0)? "on" : "off",
"\tnumber of connected clients: %d\n"
"\tmaximal number of clients: %d%s\n"
"\tconnected clients: %s\n"
"\taccess %s list: %s\n",
name,
(ss->listen_fd >= 0)? "on" : "off",
* \sa \ref para_accept(), \ref mark_fd_nonblocking(), \ref acl_check_access(),
* \ref cq_new(), \ref add_close_on_fork_list().
*/
* \sa \ref para_accept(), \ref mark_fd_nonblocking(), \ref acl_check_access(),
* \ref cq_new(), \ref add_close_on_fork_list().
*/
- int fd, ret = para_accept(ss->listen_fd, NULL, 0);
- if (ret < 0) {
+ int fd, ret;
+
+ if (ss->listen_fd < 0)
+ return NULL;
+ ret = para_accept(ss->listen_fd, rfds, NULL, 0, &fd);
+ if (ret < 0)
- "usage: {allow|deny} IP mask\n"
- "example: allow 127.0.0.1 32\n"
+ "usage: {allow|deny} IP[/netmask]\n"
+ " where mask defaults to 32\n"
+ "example: allow 192.168.0.1/24\n"