summaryrefslogtreecommitdiff
path: root/opentracker.c
diff options
context:
space:
mode:
authorerdgeist <>2007-07-22 16:17:26 +0000
committererdgeist <>2007-07-22 16:17:26 +0000
commitafe966b64418c01e7ea09bb31c720365b0c4f395 (patch)
treea7613c25c71fa9d7d7d95b5492170b4b818015e7 /opentracker.c
parentc0b00c0bf5b9414f93c76bb6daef9c01e2b49628 (diff)
some subnet stats... still ugly and untested.
Diffstat (limited to 'opentracker.c')
-rw-r--r--opentracker.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/opentracker.c b/opentracker.c
index b13dc11..ff1c1c6 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -274,6 +274,8 @@ static void httpresponse( const int64 s, char *data ) {
274 mode = STATS_TCP; 274 mode = STATS_TCP;
275 else if( !byte_diff(data,4,"udp4")) 275 else if( !byte_diff(data,4,"udp4"))
276 mode = STATS_UDP; 276 mode = STATS_UDP;
277 else if( !byte_diff(data,4,"s24s"))
278 mode = STATS_SLASH24S;
277 else 279 else
278 HTTPERROR_400_PARAM; 280 HTTPERROR_400_PARAM;
279 } 281 }
@@ -304,6 +306,9 @@ static void httpresponse( const int64 s, char *data ) {
304 /* Enough for http header + whole scrape string */ 306 /* Enough for http header + whole scrape string */
305 if( !( reply_size = return_stats_for_tracker( SUCCESS_HTTP_HEADER_LENGTH + static_outbuf, mode ) ) ) HTTPERROR_500; 307 if( !( reply_size = return_stats_for_tracker( SUCCESS_HTTP_HEADER_LENGTH + static_outbuf, mode ) ) ) HTTPERROR_500;
306 break; 308 break;
309 case STATS_SLASH24S:
310 if( !( reply_size = return_stats_for_slash24s( SUCCESS_HTTP_HEADER_LENGTH + static_outbuf, 25, 64 ) ) ) HTTPERROR_500;
311 break;
307 } 312 }
308 break; 313 break;
309 314