summaryrefslogtreecommitdiff
path: root/src/common/socket.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-09-18 13:09:16 +0200
committerHaru <haru@dotalux.com>2015-09-25 12:55:36 +0200
commit1aea178ef7cdb76eda5600540b5fbd29fd54ff88 (patch)
tree855d4feafba212d7f36872c1b46814c1f1a85e75 /src/common/socket.c
parente99bf73af31a8b1f09b9ce033c16832ee5cac51d (diff)
downloadhercules-1aea178ef7cdb76eda5600540b5fbd29fd54ff88.tar.gz
hercules-1aea178ef7cdb76eda5600540b5fbd29fd54ff88.tar.bz2
hercules-1aea178ef7cdb76eda5600540b5fbd29fd54ff88.tar.xz
hercules-1aea178ef7cdb76eda5600540b5fbd29fd54ff88.zip
More aggressive whitespace cleanup. Follow up to 51329e6
Signed-off-by: Haru <haru@dotalux.com>
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;