From 04051a5cd0ebf569fc20772bb4458b10608f5531 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 24 Apr 2020 12:20:15 +0200 Subject: [PATCH] soapy: add missing error messages for some soapy calls --- lib/src/phy/rf/rf_soapy_imp.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/src/phy/rf/rf_soapy_imp.c b/lib/src/phy/rf/rf_soapy_imp.c index f2dcd6c96..a65011673 100644 --- a/lib/src/phy/rf/rf_soapy_imp.c +++ b/lib/src/phy/rf/rf_soapy_imp.c @@ -227,8 +227,10 @@ int rf_soapy_start_tx_stream(void* h) { rf_soapy_handler_t* handler = (rf_soapy_handler_t*)h; if (handler->tx_stream_active == false) { - if (SoapySDRDevice_activateStream(handler->device, handler->txStream, 0, 0, 0) != 0) + if (SoapySDRDevice_activateStream(handler->device, handler->txStream, 0, 0, 0) != 0) { + printf("Error starting Tx streaming.\n"); return SRSLTE_ERROR; + } handler->tx_stream_active = true; } return SRSLTE_SUCCESS; @@ -237,8 +239,10 @@ int rf_soapy_start_tx_stream(void* h) int rf_soapy_stop_rx_stream(void* h) { rf_soapy_handler_t* handler = (rf_soapy_handler_t*)h; - if (SoapySDRDevice_deactivateStream(handler->device, handler->rxStream, 0, 0) != 0) + if (SoapySDRDevice_deactivateStream(handler->device, handler->rxStream, 0, 0) != 0) { + printf("Error deactivating Rx streaming.\n"); return SRSLTE_ERROR; + } handler->rx_stream_active = false; return SRSLTE_SUCCESS; @@ -247,8 +251,10 @@ int rf_soapy_stop_rx_stream(void* h) int rf_soapy_stop_tx_stream(void* h) { rf_soapy_handler_t* handler = (rf_soapy_handler_t*)h; - if (SoapySDRDevice_deactivateStream(handler->device, handler->txStream, 0, 0) != 0) + if (SoapySDRDevice_deactivateStream(handler->device, handler->txStream, 0, 0) != 0) { + printf("Error deactivating Tx streaming.\n"); return SRSLTE_ERROR; + } handler->tx_stream_active = false; return SRSLTE_SUCCESS;