summaryrefslogtreecommitdiff
path: root/ot_stats.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-11-02 02:14:11 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-11-02 02:14:11 +0100
commit4b7f4f04e39779c3496855ea46fff565c360a4d5 (patch)
tree1384de505a2a9f13480366aae553e3aa3a00a53c /ot_stats.c
parent451947b7bed5ba6c9c925ceb10df39c42a330614 (diff)
Prepare a versioning mechanism for the tracker that works from tarballs
Diffstat (limited to 'ot_stats.c')
-rw-r--r--ot_stats.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ot_stats.c b/ot_stats.c
index eb046a0..a9f12cc 100644
--- a/ot_stats.c
+++ b/ot_stats.c
@@ -547,9 +547,12 @@ static void stats_return_everything(char **reply, const char *reply_end) {
547} 547}
548 548
549void stats_return_tracker_version(char **reply, const char *reply_end) { 549void stats_return_tracker_version(char **reply, const char *reply_end) {
550#define QUOTE(name) #name 550 fmt_append(reply, reply_end, "opentracker %s", OT_VERSION);
551#define SQUOTE(name) QUOTE(name) 551 /* Empty when the build had no git to ask, which is what a release tarball
552 fmt_append(reply, reply_end, "https://erdgeist.org/gitweb/opentracker/commit/?id=" SQUOTE(GIT_VERSION) "\n"); 552 looks like */
553 if (*GIT_VERSION)
554 fmt_append(reply, reply_end, " (%s)", GIT_VERSION);
555 fmt_append(reply, reply_end, "\n");
553} 556}
554 557
555void return_stats_for_tracker(char **reply, const char *reply_end, int mode, int format) { 558void return_stats_for_tracker(char **reply, const char *reply_end, int mode, int format) {