aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
diff options
context:
space:
mode:
authorThomas Tsou <tom@tsou.cc>2013-10-15 20:31:44 -0400
committerThomas Tsou <tom@tsou.cc>2013-10-18 13:10:18 -0400
commit61b4a6ad9f959421b2bf61e6e55bb0713f0db822 (patch)
tree94f60aff31c9d4fcc13d9791afb19e58cc4c8895 /Transceiver52M
parentde1648ca6b21118eb947cd33e643e93a4c56542e (diff)
Transceiver52M: Delay UHD messaging registration until after start
We want to push UHD logs to the OpenBTS logging system, but most device errors occur at startup, so keep the output on stdout until after device initialization. That way obvious errors are easily viewable before seeing the useless TRX timeout message. Signed-off-by: Thomas Tsou <tom@tsou.cc>
Diffstat (limited to 'Transceiver52M')
-rw-r--r--Transceiver52M/UHDDevice.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp
index f4b7cf4..03ff0ca 100644
--- a/Transceiver52M/UHDDevice.cpp
+++ b/Transceiver52M/UHDDevice.cpp
@@ -521,9 +521,6 @@ bool uhd_device::parse_dev_type()
int uhd_device::open(const std::string &args)
{
- // Register msg handler
- uhd::msg::register_handler(&uhd_msg_handler);
-
// Find UHD devices
uhd::device_addr_t addr(args);
uhd::device_addrs_t dev_addrs = uhd::device::find(addr);
@@ -644,6 +641,9 @@ bool uhd_device::start()
setPriority();
+ // Register msg handler
+ uhd::msg::register_handler(&uhd_msg_handler);
+
// Start asynchronous event (underrun check) loop
async_event_thrd.start((void * (*)(void*))async_event_loop, (void*)this);