summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clientserver.c2
-rw-r--r--log.c4
-rw-r--r--options.c7
3 files changed, 9 insertions, 4 deletions
diff --git a/clientserver.c b/clientserver.c
index 0f54dcab..48c15a60 100644
--- a/clientserver.c
+++ b/clientserver.c
@@ -1451,7 +1451,7 @@ int daemon_main(void)
log_init(0);
rprintf(FLOG, "rsyncd version %s starting, listening on port %d\n",
- RSYNC_VERSION, rsync_port);
+ rsync_version(), rsync_port);
/* TODO: If listening on a particular address, then show that
* address too. In fact, why not just do getnameinfo on the
* local address??? */
diff --git a/log.c b/log.c
index e641198c..062a930e 100644
--- a/log.c
+++ b/log.c
@@ -891,10 +891,10 @@ void log_exit(int code, const char *file, int line)
/* VANISHED is not an error, only a warning */
if (code == RERR_VANISHED) {
rprintf(FWARNING, "rsync warning: %s (code %d) at %s(%d) [%s=%s]\n",
- name, code, src_file(file), line, who_am_i(), RSYNC_VERSION);
+ name, code, src_file(file), line, who_am_i(), rsync_version());
} else {
rprintf(FERROR, "rsync error: %s (code %d) at %s(%d) [%s=%s]\n",
- name, code, src_file(file), line, who_am_i(), RSYNC_VERSION);
+ name, code, src_file(file), line, who_am_i(), rsync_version());
}
}
}
diff --git a/options.c b/options.c
index 0e9f3db6..dc3dcee9 100644
--- a/options.c
+++ b/options.c
@@ -720,6 +720,11 @@ static void print_info_flags(enum logcode f)
}
}
+const char *rsync_version(void)
+{
+ return RSYNC_GITVER;
+}
+
static void print_rsync_version(enum logcode f)
{
char tmpbuf[256], *subprotocol = "";
@@ -728,7 +733,7 @@ static void print_rsync_version(enum logcode f)
subprotocol = istring(".PR%d", SUBPROTOCOL_VERSION);
#endif
rprintf(f, "%s version %s protocol version %d%s\n",
- RSYNC_NAME, RSYNC_GITVER, PROTOCOL_VERSION, subprotocol);
+ RSYNC_NAME, rsync_version(), PROTOCOL_VERSION, subprotocol);
rprintf(f, "Copyright (C) 1996-" LATEST_YEAR " by Andrew Tridgell, Wayne Davison, and others.\n");
rprintf(f, "Web site: https://rsync.samba.org/\n");