diff options
author | erdgeist <> | 2007-12-20 06:04:15 +0000 |
---|---|---|
committer | erdgeist <> | 2007-12-20 06:04:15 +0000 |
commit | 57387588ed926d15d34edd62c0d108a97b5dac0f (patch) | |
tree | 2126df088794cde68614f146c2cc272bd9c009ae | |
parent | eadb0b843691c5399667fc4d6cc81999c048f0df (diff) |
Enable revision watching from the internet
-rw-r--r-- | ot_http.c | 6 | ||||
-rw-r--r-- | ot_mutex.h | 1 | ||||
-rw-r--r-- | ot_stats.c | 2 |
3 files changed, 7 insertions, 2 deletions
@@ -253,10 +253,12 @@ static ssize_t http_handle_stats( const int64 client_socket, char *data, char *d | |||
253 | mode = TASK_STATS_TPB; | 253 | mode = TASK_STATS_TPB; |
254 | else if( !byte_diff(data,4,"herr")) | 254 | else if( !byte_diff(data,4,"herr")) |
255 | mode = TASK_STATS_HTTPERRORS; | 255 | mode = TASK_STATS_HTTPERRORS; |
256 | else if( !byte_diff(data,9,"startstop")) | 256 | else if( !byte_diff(data,4,"startstop")) |
257 | mode = TASK_STATS_STARTSTOP; | 257 | mode = TASK_STATS_STARTSTOP; |
258 | else if( !byte_diff(data,10,"toraddrem")) | 258 | else if( !byte_diff(data,4,"toraddrem")) |
259 | mode = TASK_STATS_TORADDREM; | 259 | mode = TASK_STATS_TORADDREM; |
260 | else if( !byte_diff(data,4,"vers")) | ||
261 | mode = TASK_STATS_VERSION; | ||
260 | else | 262 | else |
261 | HTTPERROR_400_PARAM; | 263 | HTTPERROR_400_PARAM; |
262 | break; | 264 | break; |
@@ -28,6 +28,7 @@ typedef enum { | |||
28 | TASK_STATS_TORRENTS = 0x0009, | 28 | TASK_STATS_TORRENTS = 0x0009, |
29 | TASK_STATS_STARTSTOP = 0x000a, | 29 | TASK_STATS_STARTSTOP = 0x000a, |
30 | TASK_STATS_TORADDREM = 0x000b, | 30 | TASK_STATS_TORADDREM = 0x000b, |
31 | TASK_STATS_VERSION = 0x000c, | ||
31 | 32 | ||
32 | TASK_STATS_SLASH24S = 0x0100, | 33 | TASK_STATS_SLASH24S = 0x0100, |
33 | 34 | ||
@@ -375,6 +375,8 @@ size_t return_stats_for_tracker( char *reply, int mode, int format ) { | |||
375 | return stats_fullscrapes_mrtg( reply ); | 375 | return stats_fullscrapes_mrtg( reply ); |
376 | case TASK_STATS_HTTPERRORS: | 376 | case TASK_STATS_HTTPERRORS: |
377 | return stats_httperrors_txt( reply ); | 377 | return stats_httperrors_txt( reply ); |
378 | case TASK_STATS_VERSION: | ||
379 | return stats_return_tracker_version( reply ); | ||
378 | default: | 380 | default: |
379 | return 0; | 381 | return 0; |
380 | } | 382 | } |