diff options
author | erdgeist <> | 2007-11-06 18:02:03 +0000 |
---|---|---|
committer | erdgeist <> | 2007-11-06 18:02:03 +0000 |
commit | 927ac023ce2c761063bbae81bb44b0aab624e36f (patch) | |
tree | cdae567406af42f8107daefdec8b762d30c63a13 /opentracker.c | |
parent | ad5fa66737dd77260b881ca673d03b1c171fa7bd (diff) |
The expensive DMEM stats is gone. No need for it, too much potential to DOS.
Diffstat (limited to 'opentracker.c')
-rw-r--r-- | opentracker.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/opentracker.c b/opentracker.c index 6bde42e..8b440c5 100644 --- a/opentracker.c +++ b/opentracker.c | |||
@@ -325,8 +325,6 @@ LOG_TO_STDERR( "sync: %d.%d.%d.%d\n", h->ip[0], h->ip[1], h->ip[2], h->ip[3] ); | |||
325 | mode = STATS_TOP5; | 325 | mode = STATS_TOP5; |
326 | else if( !byte_diff(data,4,"fscr")) | 326 | else if( !byte_diff(data,4,"fscr")) |
327 | mode = STATS_FULLSCRAPE; | 327 | mode = STATS_FULLSCRAPE; |
328 | else if( !byte_diff(data,4,"dmem")) | ||
329 | mode = STATS_DMEM; | ||
330 | else if( !byte_diff(data,4,"tcp4")) | 328 | else if( !byte_diff(data,4,"tcp4")) |
331 | mode = STATS_TCP; | 329 | mode = STATS_TCP; |
332 | else if( !byte_diff(data,4,"udp4")) | 330 | else if( !byte_diff(data,4,"udp4")) |
@@ -338,16 +336,8 @@ LOG_TO_STDERR( "sync: %d.%d.%d.%d\n", h->ip[0], h->ip[1], h->ip[2], h->ip[3] ); | |||
338 | } | 336 | } |
339 | } | 337 | } |
340 | 338 | ||
341 | switch( mode) | 339 | // default format for now |
342 | { | 340 | if( !( reply_size = return_stats_for_tracker( static_outbuf + SUCCESS_HTTP_HEADER_LENGTH, mode, 0 ) ) ) HTTPERROR_500; |
343 | case STATS_DMEM: | ||
344 | if( !( reply_size = return_memstat_for_tracker( &reply ) ) ) HTTPERROR_500; | ||
345 | return sendmmapdata( s, reply, reply_size ); | ||
346 | default: | ||
347 | // default format for now | ||
348 | if( !( reply_size = return_stats_for_tracker( static_outbuf + SUCCESS_HTTP_HEADER_LENGTH, mode, 0 ) ) ) HTTPERROR_500; | ||
349 | break; | ||
350 | } | ||
351 | break; | 341 | break; |
352 | 342 | ||
353 | /****************************** | 343 | /****************************** |