Skip to content

Commit

Permalink
fix for UHD 3.11 logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ismagom committed Mar 27, 2017
1 parent c49a299 commit cbb7e3c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions srslte/lib/rf/uhd_c_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ extern "C" {
#include "uhd_c_api.h"
}

#if UHD_VERSION < 31100
static void (*handler)(const char*);

void translate_handler(uhd::msg::type_t type, const std::string & msg)
{
if(handler)
handler(msg.c_str());
}
#endif

void rf_uhd_register_msg_handler_c(void (*new_handler)(const char*))
{
#if UHD_VERSION < 31100
handler = new_handler;
uhd::msg::register_handler(translate_handler);
#endif
}

void uhd_tx_metadata_set_time_spec(uhd_tx_metadata_handle *md, time_t secs, double frac_secs)
Expand Down

0 comments on commit cbb7e3c

Please sign in to comment.