summaryrefslogtreecommitdiff
path: root/src/common/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/socket.c')
-rw-r--r--src/common/socket.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/common/socket.c b/src/common/socket.c
index c4cc4a329..de8ca4682 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -113,7 +113,6 @@ int sock2fd(SOCKET s)
return fd;
}
-
/// Inserts the socket into the global array of sockets.
/// Returns a new fd associated with the socket.
/// If there are too many sockets it closes the socket, sets an error and
@@ -293,7 +292,6 @@ void set_defaultparse(ParseFunc defaultparse)
default_func_parse = defaultparse;
}
-
/*======================================
* CORE : Socket options
*--------------------------------------*/
@@ -1066,12 +1064,12 @@ static int connect_check_clear(int tid, int64 tick, int id, intptr_t data) {
int list = 0;
ConnectHistory *hist = NULL;
DBIterator *iter;
-
+
if( !db_size(connect_history) )
return 0;
-
+
iter = db_iterator(connect_history);
-
+
for( hist = dbi_first(iter); dbi_exists(iter); hist = dbi_next(iter) ){
if( (!hist->ddos && DIFF_TICK(tick,hist->tick) > ddos_interval*3) ||
(hist->ddos && DIFF_TICK(tick,hist->tick) > ddos_autoreset) )
@@ -1081,13 +1079,12 @@ static int connect_check_clear(int tid, int64 tick, int id, intptr_t data) {
}
list++;
}
-
dbi_destroy(iter);
-
+
if( access_debug ){
ShowInfo("connect_check_clear: Cleared %d of %d from IP list.\n", clear, list);
}
-
+
return list;
}
@@ -1206,7 +1203,6 @@ int socket_config_read(const char* cfgName)
return 0;
}
-
void socket_final(void)
{
int i;