diff --git a/lib/src/phy/rf/rf_dev.h b/lib/src/phy/rf/rf_dev.h index 9d3d2de0d..efa8923ae 100644 --- a/lib/src/phy/rf/rf_dev.h +++ b/lib/src/phy/rf/rf_dev.h @@ -22,7 +22,7 @@ /* RF frontend API */ typedef struct { const char *name; - char* (*srslte_rf_devname) (void *h); + const char* (*srslte_rf_devname)(void* h); int (*srslte_rf_start_rx_stream)(void *h, bool now); int (*srslte_rf_stop_rx_stream)(void *h); void (*srslte_rf_flush_buffer)(void *h); diff --git a/lib/src/phy/rf/rf_soapy_imp.c b/lib/src/phy/rf/rf_soapy_imp.c index 4da0adb93..ddbee1550 100644 --- a/lib/src/phy/rf/rf_soapy_imp.c +++ b/lib/src/phy/rf/rf_soapy_imp.c @@ -186,8 +186,7 @@ void rf_soapy_register_error_handler(void *h, srslte_rf_error_handler_t new_hand handler->soapy_error_handler = new_handler; } - -char* rf_soapy_devname(void* h) +const char* rf_soapy_devname(void* h) { rf_soapy_handler_t *handler = (rf_soapy_handler_t*) h; return handler->devname; @@ -209,9 +208,7 @@ void rf_soapy_calibrate_tx(void *h) char str_buf[25]; snprintf(str_buf, sizeof(str_buf), "%f", actual_bw); str_buf[24] = 0; - if (SoapySDRDevice_writeSetting(handler->device, "CALIBRATE_TX", str_buf)) { - printf("Error calibrating Rx\n"); - } + SoapySDRDevice_writeSetting(handler->device, "CALIBRATE_TX", str_buf); } int rf_soapy_start_rx_stream(void *h, bool now) diff --git a/lib/src/phy/rf/rf_soapy_imp.h b/lib/src/phy/rf/rf_soapy_imp.h index 155dd3aec..d90ed6a56 100644 --- a/lib/src/phy/rf/rf_soapy_imp.h +++ b/lib/src/phy/rf/rf_soapy_imp.h @@ -32,7 +32,7 @@ SRSLTE_API int rf_soapy_open(char *args, SRSLTE_API int rf_soapy_open_multi(char* args, void** handler, uint32_t num_requested_channels); -SRSLTE_API char* rf_soapy_devname(void *h); +SRSLTE_API const char* rf_soapy_devname(void* h); SRSLTE_API int rf_soapy_close(void *h); diff --git a/lib/src/phy/rf/rf_uhd_imp.c b/lib/src/phy/rf/rf_uhd_imp.c index c3473e28d..e5633e6bd 100644 --- a/lib/src/phy/rf/rf_uhd_imp.c +++ b/lib/src/phy/rf/rf_uhd_imp.c @@ -226,7 +226,7 @@ wait_sensor_locked(rf_uhd_handler_t* handler, char* sensor_name, bool is_mboard, return error; } -char* rf_uhd_devname(void* h) +const char* rf_uhd_devname(void* h) { rf_uhd_handler_t* handler = (rf_uhd_handler_t*)h; return handler->devname; diff --git a/lib/src/phy/rf/rf_uhd_imp.h b/lib/src/phy/rf/rf_uhd_imp.h index 34aac195d..49c85ea13 100644 --- a/lib/src/phy/rf/rf_uhd_imp.h +++ b/lib/src/phy/rf/rf_uhd_imp.h @@ -38,7 +38,7 @@ SRSLTE_API int rf_uhd_open_multi(char *args, void **handler, uint32_t nof_channels); -SRSLTE_API char* rf_uhd_devname(void *h); +SRSLTE_API const char* rf_uhd_devname(void* h); SRSLTE_API int rf_uhd_close(void *h); diff --git a/lib/src/phy/rf/rf_zmq_imp.c b/lib/src/phy/rf/rf_zmq_imp.c index af6c19b5e..7497db701 100644 --- a/lib/src/phy/rf/rf_zmq_imp.c +++ b/lib/src/phy/rf/rf_zmq_imp.c @@ -157,9 +157,9 @@ void rf_zmq_register_error_handler(void* h, srslte_rf_error_handler_t new_handle // do nothing } -char* rf_zmq_devname(void* h) +const char* rf_zmq_devname(void* h) { - return (char*)zmq_devname; + return zmq_devname; } int rf_zmq_start_rx_stream(void* h, bool now) diff --git a/lib/src/phy/rf/rf_zmq_imp.h b/lib/src/phy/rf/rf_zmq_imp.h index cab2f68e6..d8758fba4 100644 --- a/lib/src/phy/rf/rf_zmq_imp.h +++ b/lib/src/phy/rf/rf_zmq_imp.h @@ -33,7 +33,7 @@ SRSLTE_API int rf_zmq_open(char* args, void** handler); SRSLTE_API int rf_zmq_open_multi(char* args, void** handler, uint32_t nof_channels); -SRSLTE_API char* rf_zmq_devname(void* h); +SRSLTE_API const char* rf_zmq_devname(void* h); SRSLTE_API int rf_zmq_close(void* h);