0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-29 08:54:02 +01:00

listener.c fixes - part 1

This commit is contained in:
Valery Yatsko 2008-04-02 20:49:46 +04:00
parent 99c4835f99
commit 59dc6c8634

View file

@ -487,6 +487,7 @@ accept_precallback(rb_fde_t *F, struct sockaddr *addr, rb_socklen_t addrlen, voi
struct Listener *listener = (struct Listener *)data;
char buf[BUFSIZE];
struct ConfItem *aconf;
static time_t last_oper_notice = 0;
if((maxconnections - 10) < rb_get_fd(F)) /* XXX this is kinda bogus */
{
@ -508,7 +509,7 @@ accept_precallback(rb_fde_t *F, struct sockaddr *addr, rb_socklen_t addrlen, voi
return 0;
}
aconf = find_dline(addr);
aconf = find_dline(addr, addr.ss_family);
if(aconf != NULL && (aconf->status & CONF_EXEMPTDLINE))
return 1;
@ -554,5 +555,5 @@ accept_callback(rb_fde_t *F, int status, struct sockaddr *addr, rb_socklen_t add
rb_close(F);
}
add_connection(listener, F, addr, (struct sockaddr *)&lip, NULL);
add_connection(listener, F, addr, (struct sockaddr *)&lip, 1);
}