diff options
author | erdgeist <> | 2009-07-15 16:14:38 +0000 |
---|---|---|
committer | erdgeist <> | 2009-07-15 16:14:38 +0000 |
commit | 531ebd494953ec28f2639825cd48060296b5f438 (patch) | |
tree | 429753813f017d240c300bb7f683e080e19b5abc /ot_stats.c | |
parent | 6819db7e98d4736e94622d4f63665054f29dbb88 (diff) |
Make opentracker return tracker id in stats=everything request
Diffstat (limited to 'ot_stats.c')
-rw-r--r-- | ot_stats.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -13,6 +13,7 @@ | |||
13 | #include <string.h> | 13 | #include <string.h> |
14 | #include <pthread.h> | 14 | #include <pthread.h> |
15 | #include <unistd.h> | 15 | #include <unistd.h> |
16 | #include <inttypes.h> | ||
16 | 17 | ||
17 | /* Libowfat */ | 18 | /* Libowfat */ |
18 | #include "byte.h" | 19 | #include "byte.h" |
@@ -485,6 +486,7 @@ static size_t stats_return_everything( char * reply ) { | |||
485 | 486 | ||
486 | r += sprintf( r, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ); | 487 | r += sprintf( r, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ); |
487 | r += sprintf( r, "<stats>\n" ); | 488 | r += sprintf( r, "<stats>\n" ); |
489 | r += sprintf( r, " <tracker_id>%" PRIu32 "</tracker_id>\n", g_tracker_id ); | ||
488 | r += sprintf( r, " <version>\n" ); r += stats_return_tracker_version( r ); r += sprintf( r, " </version>\n" ); | 490 | r += sprintf( r, " <version>\n" ); r += stats_return_tracker_version( r ); r += sprintf( r, " </version>\n" ); |
489 | r += sprintf( r, " <uptime>%llu</uptime>\n", (unsigned long long)(time( NULL ) - ot_start_time) ); | 491 | r += sprintf( r, " <uptime>%llu</uptime>\n", (unsigned long long)(time( NULL ) - ot_start_time) ); |
490 | r += sprintf( r, " <torrents>\n" ); | 492 | r += sprintf( r, " <torrents>\n" ); |