diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-03-11 10:47:25 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-03-11 10:47:25 -0500 |
commit | 671318c3a84657acc8b97cf59871489065264ece (patch) | |
tree | f0d187164a0a8b212d6fd6f60aa81e091bf8cd3b /src/or/config.c | |
parent | d080fe8db14817e6eaf37359c638805909a306a1 (diff) | |
download | tor-671318c3a84657acc8b97cf59871489065264ece.tar tor-671318c3a84657acc8b97cf59871489065264ece.tar.gz |
Revert "Simplest fix to bug2402: do not include SVN versions"
This reverts commit a1073ee956021ead19d30c2151510dbaced416a8.
Apparently, we totally misunderstood how the debian packages were using
microrevisions. Better fix that!
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c index 209a92d15..8397b231a 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -827,7 +827,16 @@ static char *_version = NULL; const char * get_version(void) { - return VERSION; + if (_version == NULL) { + if (strlen(tor_svn_revision)) { + size_t len = strlen(VERSION)+strlen(tor_svn_revision)+8; + _version = tor_malloc(len); + tor_snprintf(_version, len, "%s (r%s)", VERSION, tor_svn_revision); + } else { + _version = tor_strdup(VERSION); + } + } + return _version; } /** Release additional memory allocated in options |