summaryrefslogtreecommitdiff
path: root/ot_http.c
diff options
context:
space:
mode:
authordenis <>2007-12-14 22:01:14 +0000
committerdenis <>2007-12-14 22:01:14 +0000
commit65c3b2404560b976bfeff0db190c97d4b9487644 (patch)
tree1c26a7981f8a05c031e38ab8f941cbc34b696340 /ot_http.c
parentc2cbe1dc273984c689c97f5eca8798195d5a35a0 (diff)
add support for more stats:
1. stats for added and removed torrents 2. stats for start and stopped events from peers this should help to detect DoS attacks and is useful for profiling
Diffstat (limited to 'ot_http.c')
-rw-r--r--ot_http.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ot_http.c b/ot_http.c
index faf1aae..a377e84 100644
--- a/ot_http.c
+++ b/ot_http.c
@@ -251,6 +251,10 @@ static ssize_t http_handle_stats( const int64 client_socket, char *data, char *d
251 mode = TASK_STATS_TPB; 251 mode = TASK_STATS_TPB;
252 else if( !byte_diff(data,4,"herr")) 252 else if( !byte_diff(data,4,"herr"))
253 mode = TASK_STATS_HTTPERRORS; 253 mode = TASK_STATS_HTTPERRORS;
254 else if( !byte_diff(data,9,"startstop"))
255 mode = TASK_STATS_STARTSTOP;
256 else if( !byte_diff(data,10,"toraddrem"))
257 mode = TASK_STATS_TORADDREM;
254 else 258 else
255 HTTPERROR_400_PARAM; 259 HTTPERROR_400_PARAM;
256 break; 260 break;