diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-02 03:09:20 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-02 03:09:20 +0100 |
| commit | 1f26001944702312c9ae7d7a047589543cbf8e30 (patch) | |
| tree | 1d2e7f164b1a5605d5464137bd84fb53bbe88a91 | |
| parent | 2b87dc1c3d64b5fdcf1bd82234ab57619f82f015 (diff) | |
Remove tracker id from stats, as well
| -rw-r--r-- | ot_stats.c | 2 | ||||
| -rw-r--r-- | tests/integration/test_stats.py | 6 |
2 files changed, 6 insertions, 2 deletions
| @@ -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 | ||
| 70 | class StatsCount(TrackerTestCase): | 76 | class StatsCount(TrackerTestCase): |
| 71 | def test_the_torrent_count_follows_the_torrents(self): | 77 | def test_the_torrent_count_follows_the_torrents(self): |
