diff --git a/src/sbbs3/ftpsrvr.c b/src/sbbs3/ftpsrvr.c index df30b36e327abb1784cf18d7f0eb4daaf87b89d9..a3f9240733d216953ab46cad5aed67f490661f60 100644 --- a/src/sbbs3/ftpsrvr.c +++ b/src/sbbs3/ftpsrvr.c @@ -2403,12 +2403,6 @@ static void ctrl_thread(void* arg) SAFECOPY(host_ip,inet_ntoa(ftp.client_addr.sin_addr)); - if(trashcan(&scfg,host_ip,"ip-silent")) { - ftp_close_socket(&sock,__LINE__); - thread_down(); - return; - } - lprintf ("%04d CTRL connection accepted from: %s port %u" ,sock, host_ip, ntohs(ftp.client_addr.sin_port)); @@ -4713,6 +4707,11 @@ void DLLCALL ftp_server(void* arg) startup->socket_open(TRUE); sockets++; + if(trashcan(&scfg,inet_ntoa(client_addr.sin_addr),"ip-silent")) { + ftp_close_socket(&client_socket,__LINE__); + continue; + } + if(active_clients>=startup->max_clients) { lprintf("%04d !MAXMIMUM CLIENTS (%d) reached, access denied" ,client_socket, startup->max_clients); diff --git a/src/sbbs3/mailsrvr.c b/src/sbbs3/mailsrvr.c index 7c5f2fe0fc2c3fa8e831c9eae70fc604daeda990..048d4cccd36a0c692d59430dd3807e23fbdafccf 100644 --- a/src/sbbs3/mailsrvr.c +++ b/src/sbbs3/mailsrvr.c @@ -658,12 +658,6 @@ static void pop3_thread(void* arg) SAFECOPY(host_ip,inet_ntoa(pop3.client_addr.sin_addr)); - if(trashcan(&scfg,host_ip,"ip-silent")) { - mail_close_socket(socket); - thread_down(); - return; - } - if(startup->options&MAIL_OPT_DEBUG_POP3) lprintf("%04d POP3 connection accepted from: %s port %u" ,socket, host_ip, ntohs(pop3.client_addr.sin_port)); @@ -1495,12 +1489,6 @@ static void smtp_thread(void* arg) SAFECOPY(host_ip,inet_ntoa(smtp.client_addr.sin_addr)); - if(trashcan(&scfg,host_ip,"ip-silent")) { - mail_close_socket(socket); - thread_down(); - return; - } - lprintf("%04d SMTP connection accepted from: %s port %u" , socket, host_ip, ntohs(smtp.client_addr.sin_port)); @@ -3461,6 +3449,11 @@ void DLLCALL mail_server(void* arg) startup->socket_open(TRUE); sockets++; + if(trashcan(&scfg,inet_ntoa(client_addr.sin_addr),"ip-silent")) { + mail_close_socket(client_socket); + continue; + } + if(active_clients>=startup->max_clients) { lprintf("%04d !MAXMIMUM CLIENTS (%u) reached, access denied" ,client_socket, startup->max_clients); @@ -3511,6 +3504,11 @@ void DLLCALL mail_server(void* arg) startup->socket_open(TRUE); sockets++; + if(trashcan(&scfg,inet_ntoa(client_addr.sin_addr),"ip-silent")) { + mail_close_socket(client_socket); + continue; + } + if(active_clients>=startup->max_clients) { lprintf("%04d !MAXMIMUM CLIENTS (%u) reached, access denied" ,client_socket, startup->max_clients);