diff options
author | denis <> | 2007-12-14 22:01:14 +0000 |
---|---|---|
committer | denis <> | 2007-12-14 22:01:14 +0000 |
commit | 65c3b2404560b976bfeff0db190c97d4b9487644 (patch) | |
tree | 1c26a7981f8a05c031e38ab8f941cbc34b696340 /ot_http.c | |
parent | c2cbe1dc273984c689c97f5eca8798195d5a35a0 (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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; |