From 4844f66dccaa71da102b02bba7b8caf8f84a932c Mon Sep 17 00:00:00 2001 From: Trung N Tran Date: Wed, 14 Mar 2018 08:31:33 -0700 Subject: fixup! usrp: Add set_gpio_attr overload that use string set_gpio_attr did not return after completion. This leads to wrong error reporting. --- host/lib/usrp/multi_usrp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/multi_usrp.cpp') diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index b7d131bac..c08c6c0af 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -1913,6 +1913,7 @@ public: if (attr == gpio_atr::gpio_attr_map.at(gpio_atr::GPIO_SRC)){ throw uhd::runtime_error("Setting gpio source does not supported in daughter board."); } + return; } throw uhd::runtime_error(str(boost::format( "The hardware has no gpio bank: %s:\n") % bank)); @@ -1950,7 +1951,6 @@ public: } break; } - return; }else{ throw uhd::runtime_error(str(boost::format( @@ -1973,6 +1973,7 @@ public: if (attr == gpio_atr::gpio_attr_map.at(gpio_atr::GPIO_SRC)){ throw uhd::runtime_error("Setting gpio source does not supported in daughter board."); } + return; } throw uhd::runtime_error(str(boost::format("The hardware has no gpio bank: %s:\n") % bank)); } @@ -2001,7 +2002,6 @@ public: return uint32_t(_tree->access(mb_root(mboard) / "gpio" / bank / attr).get()); } } - return 0; }else{ throw uhd::runtime_error(str(boost::format("The hardware has no gpio attribute: %s:\n") % attr)); -- cgit v1.2.3