aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/usrp_c.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp_c.cpp b/host/lib/usrp/usrp_c.cpp
index 4f2ed8c65..fdb0321cf 100644
--- a/host/lib/usrp/usrp_c.cpp
+++ b/host/lib/usrp/usrp_c.cpp
@@ -324,10 +324,11 @@ uhd_error uhd_usrp_get_rx_stream(
uhd_stream_args_t *stream_args,
uhd_rx_streamer_handle h_s
){
- UHD_SAFE_C(
+ UHD_SAFE_C_SAVE_ERROR(h_s,
boost::mutex::scoped_lock lock(_usrp_get_rx_stream_mutex);
if(!get_usrp_ptrs().count(h_u->usrp_index)){
+ h_s->last_error = "Streamer's device is invalid or expired.";
return UHD_ERROR_INVALID_DEVICE;
}
@@ -346,10 +347,11 @@ uhd_error uhd_usrp_get_tx_stream(
uhd_stream_args_t *stream_args,
uhd_tx_streamer_handle h_s
){
- UHD_SAFE_C(
+ UHD_SAFE_C_SAVE_ERROR(h_s,
boost::mutex::scoped_lock lock(_usrp_get_tx_stream_mutex);
if(!get_usrp_ptrs().count(h_u->usrp_index)){
+ h_s->last_error = "Streamer's device is invalid or expired.";
return UHD_ERROR_INVALID_DEVICE;
}