Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

First half of r4299 in private:

 adds printing deeper version information.

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4509 19bc5d8c-e614-43d4-8b26-e1612bc8e597
  • Loading branch information...
commit 763e975fc493d48a3a1a81412cca96e1912f03c4 1 parent 0c1a306
kurtis.heimerl authored
View
2  CLI/CLI.cpp
@@ -586,7 +586,7 @@ int alarms(int argc, char** argv, ostream& os)
int version(int argc, char **argv, ostream& os)
{
if (argc!=1) return BAD_NUM_ARGS;
- os << "release " VERSION " built " __DATE__ << endl;
+ os << gVersionString << endl;
return SUCCESS;
}
View
5 Globals/Globals.cpp
@@ -31,6 +31,9 @@
#include <TMSITable.h>
#include <URLEncode.h>
+#define PROD_CAT "P"
+
+const char *gVersionString = "release " VERSION " " PROD_CAT " built " __DATE__ " rev" SVN_REV " ";
const char* gOpenBTSWelcome =
//23456789123456789223456789323456789423456789523456789623456789723456789
@@ -38,7 +41,7 @@ const char* gOpenBTSWelcome =
"Copyright 2008, 2009, 2010, 2011 Free Software Foundation, Inc.\n"
"Copyright 2010 Kestrel Signal Processing, Inc.\n"
"Copyright 2011, 2012 Range Networks, Inc.\n"
- "Public Release " VERSION " formal build date " __DATE__ "\n"
+ "Release " VERSION " " PROD_CAT " formal build date " __DATE__ " rev" SVN_REV "\n"
"\"OpenBTS\" is a registered trademark of Range Networks, Inc.\n"
"\nContributors:\n"
" Range Networks, Inc.:\n"
View
3  Globals/Globals.h
@@ -51,6 +51,9 @@ extern ConfigurationTable gConfig;
/** The OpenBTS welcome message. */
extern const char* gOpenBTSWelcome;
+/** The OpenBTS version string. */
+extern const char *gVersionString;
+
/** The central parser. */
extern CommandLine::Parser gParser;
View
5 Makefile.common
@@ -2,7 +2,7 @@
# Copyright 2008 Free Software Foundation, Inc.
#
# This software is distributed under the terms of the GNU Public License.
-# See the COPYING file in the main directory for details.
+# See the COPING file in the main directory for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,7 +29,10 @@ CLI_INCLUDEDIR = $(top_srcdir)/CLI
SQLITE_INCLUDEDIR = $(top_srcdir)/sqlite3
SR_INCLUDEDIR = $(top_srcdir)/SR
+SVNDEV = -D'SVN_REV="$(shell svnversion -n $(top_builddir))"'
+
STD_DEFINES_AND_INCLUDES = \
+ $(SVNDEV) \
-I$(COMMON_INCLUDEDIR) \
-I$(CONTROL_INCLUDEDIR) \
-I$(GSM_INCLUDEDIR) \
View
14 apps/OpenBTS.cpp
@@ -107,6 +107,9 @@ pid_t gTransceiverPid = 0;
void startTransceiver()
{
+ // kill any stray transceiver process
+ system("killall transceiver");
+
// Start the transceiver binary, if the path is defined.
// If the path is not defined, the transceiver must be started by some other process.
char TRXnumARFCN[4];
@@ -132,6 +135,17 @@ void startTransceiver()
int main(int argc, char *argv[])
{
+ // TODO: Properly parse and handle any arguments
+ if (argc > 1) {
+ for (int argi = 0; argi < argc; argi++) {
+ if (!strcmp(argv[argi], "--version") ||
+ !strcmp(argv[argi], "-v")) {
+ cout << gVersionString << endl;
+ }
+ }
+
+ return 0;
+ }
int sock = socket(AF_UNIX,SOCK_DGRAM,0);
if (sock<0) {
Please sign in to comment.
Something went wrong with that request. Please try again.