diff options
Diffstat (limited to 'opentracker.c')
-rw-r--r-- | opentracker.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/opentracker.c b/opentracker.c index 6200087..06ba0f0 100644 --- a/opentracker.c +++ b/opentracker.c | |||
@@ -241,11 +241,18 @@ static void httpresponse( const int64 s, char *data ) { | |||
241 | mode = STATS_MRTG; | 241 | mode = STATS_MRTG; |
242 | else if( !byte_diff(data,4,"top5")) | 242 | else if( !byte_diff(data,4,"top5")) |
243 | mode = STATS_TOP5; | 243 | mode = STATS_TOP5; |
244 | else if( !byte_diff(data,4,"dmem")) | ||
245 | mode = STATS_DMEM; | ||
244 | else | 246 | else |
245 | HTTPERROR_400_PARAM; | 247 | HTTPERROR_400_PARAM; |
246 | } | 248 | } |
247 | } | 249 | } |
248 | 250 | ||
251 | if( mode == STATS_DMEM ) { | ||
252 | if( !( reply_size = return_memstat_for_tracker( &reply ) ) ) HTTPERROR_500; | ||
253 | return sendmallocdata( s, reply, reply_size ); | ||
254 | } | ||
255 | |||
249 | /* Enough for http header + whole scrape string */ | 256 | /* Enough for http header + whole scrape string */ |
250 | if( !( reply_size = return_stats_for_tracker( SUCCESS_HTTP_HEADER_LENGTH + static_outbuf, mode ) ) ) HTTPERROR_500; | 257 | if( !( reply_size = return_stats_for_tracker( SUCCESS_HTTP_HEADER_LENGTH + static_outbuf, mode ) ) ) HTTPERROR_500; |
251 | 258 | ||