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??? */
/* 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());
}
}
}
}
}
+const char *rsync_version(void)
+{
+ return RSYNC_GITVER;
+}
+
static void print_rsync_version(enum logcode f)
{
char tmpbuf[256], *subprotocol = "";
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");