|
From: <do_...@wu...> - 2013-10-18 07:21:47
|
Author: kurtis.heimerl
Date: 2013-10-18 02:21:40 -0500 (Fri, 18 Oct 2013)
New Revision: 6759
Modified:
software/public/openbts/trunk/Transceiver52M/runTransceiver.cpp
software/public/openbts/trunk/TransceiverRAD1/runTransceiver.cpp
software/public/openbts/trunk/apps/OpenBTS.cpp
Log:
small bug fixes from last patch
Modified: software/public/openbts/trunk/Transceiver52M/runTransceiver.cpp
===================================================================
--- software/public/openbts/trunk/Transceiver52M/runTransceiver.cpp 2013-10-18 06:51:25 UTC (rev 6758)
+++ software/public/openbts/trunk/Transceiver52M/runTransceiver.cpp 2013-10-18 07:21:40 UTC (rev 6759)
@@ -50,7 +50,7 @@
std::vector<std::string> configurationCrossCheck(const std::string& key);
static const char *cOpenBTSConfigEnv = "OpenBTSConfigFile";
// Load configuration from a file.
-ConfigurationTable gConfig(getenv(cOpenBTSConfigEnv)?getenv(cOpenBTSConfigEnv):CONFIGDB,"OpenBTS", getConfigurationKeys());
+ConfigurationTable gConfig(getenv(cOpenBTSConfigEnv)?getenv(cOpenBTSConfigEnv):CONFIGDB,"transceiver", getConfigurationKeys());
volatile bool gbShutdown = false;
Modified: software/public/openbts/trunk/TransceiverRAD1/runTransceiver.cpp
===================================================================
--- software/public/openbts/trunk/TransceiverRAD1/runTransceiver.cpp 2013-10-18 06:51:25 UTC (rev 6758)
+++ software/public/openbts/trunk/TransceiverRAD1/runTransceiver.cpp 2013-10-18 07:21:40 UTC (rev 6759)
@@ -33,7 +33,7 @@
std::vector<std::string> configurationCrossCheck(const std::string& key);
static const char *cOpenBTSConfigEnv = "OpenBTSConfigFile";
// Load configuration from a file.
-ConfigurationTable gConfig(getenv(cOpenBTSConfigEnv)?getenv(cOpenBTSConfigEnv):"/etc/OpenBTS/OpenBTS.db","OpenBTS", getConfigurationKeys());
+ConfigurationTable gConfig(getenv(cOpenBTSConfigEnv)?getenv(cOpenBTSConfigEnv):"/etc/OpenBTS/OpenBTS.db","transceiver", getConfigurationKeys());
FactoryCalibration gFactoryCalibration;
volatile bool gbShutdown = false;
Modified: software/public/openbts/trunk/apps/OpenBTS.cpp
===================================================================
--- software/public/openbts/trunk/apps/OpenBTS.cpp 2013-10-18 06:51:25 UTC (rev 6758)
+++ software/public/openbts/trunk/apps/OpenBTS.cpp 2013-10-18 07:21:40 UTC (rev 6759)
@@ -130,9 +130,12 @@
void startTransceiver()
{
- // kill any stray transceiver process
- //don't do this if we want to run two of them -kurtis
- if (system("killall transceiver 2>/dev/null")) {}
+ //if local kill the process currently listening on this port
+ char killCmd[32];
+ if (gConfig.getStr("TRX.IP") == "127.0.0.1"){
+ sprintf(killCmd,"fuser -k -n udp %d",(int)gConfig.getNum("TRX.Port"));
+ if (system(killCmd)) {}
+ }
// Start the transceiver binary, if the path is defined.
// If the path is not defined, the transceiver must be started by some other process.
|