summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ot_stats.c2
-rw-r--r--tests/integration/test_stats.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/ot_stats.c b/ot_stats.c
index 8771f0c..a2eb084 100644
--- a/ot_stats.c
+++ b/ot_stats.c
@@ -4,7 +4,6 @@
4 $id$ */ 4 $id$ */
5 5
6/* System */ 6/* System */
7#include <inttypes.h>
8#include <pthread.h> 7#include <pthread.h>
9#include <stdatomic.h> 8#include <stdatomic.h>
10#include <stdio.h> 9#include <stdio.h>
@@ -513,7 +512,6 @@ static void stats_return_everything(char **reply, const char *reply_end) {
513 512
514 fmt_append(reply, reply_end, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); 513 fmt_append(reply, reply_end, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
515 fmt_append(reply, reply_end, "<stats>\n"); 514 fmt_append(reply, reply_end, "<stats>\n");
516 fmt_append(reply, reply_end, " <tracker_id>%" PRIu32 "</tracker_id>\n", g_tracker_id);
517 fmt_append(reply, reply_end, " <uptime>%llu</uptime>\n", (unsigned long long)(time(NULL) - ot_start_time)); 515 fmt_append(reply, reply_end, " <uptime>%llu</uptime>\n", (unsigned long long)(time(NULL) - ot_start_time));
518 fmt_append(reply, reply_end, " <torrents>\n"); 516 fmt_append(reply, reply_end, " <torrents>\n");
519 fmt_append(reply, reply_end, " <count_mutex>%zd</count_mutex>\n", mutex_get_torrent_count()); 517 fmt_append(reply, reply_end, " <count_mutex>%zd</count_mutex>\n", mutex_get_torrent_count());
diff --git a/tests/integration/test_stats.py b/tests/integration/test_stats.py
index 74f6d47..088d8a1 100644
--- a/tests/integration/test_stats.py
+++ b/tests/integration/test_stats.py
@@ -66,6 +66,12 @@ class StatsShape(TrackerTestCase):
66 def test_everything_does_not_name_the_build(self): 66 def test_everything_does_not_name_the_build(self):
67 self.assertNotIn(b"opentracker 1", self.tracker.stats("everything")) 67 self.assertNotIn(b"opentracker 1", self.tracker.stats("everything"))
68 68
69 def test_everything_does_not_name_the_tracker_id(self):
70 """The id a tracker recognises its own live sync packets by. Knowing
71 it is of no use to a client and of some use to whoever would like a
72 tracker to discard what it is told."""
73 self.assertNotIn(b"tracker_id", self.tracker.stats("everything"))
74
69 75
70class StatsCount(TrackerTestCase): 76class StatsCount(TrackerTestCase):
71 def test_the_torrent_count_follows_the_torrents(self): 77 def test_the_torrent_count_follows_the_torrents(self):