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>
This commit is contained in:
Thomas Tsou 2013-10-15 20:31:44 -04:00
parent de1648ca6b
commit 61b4a6ad9f
1 changed files with 3 additions and 3 deletions

View File

@ -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);