summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-07-01 15:07:38 -0700
committerJosh Blum <josh@joshknows.com>2011-07-01 15:07:38 -0700
commit6aa4690af05559d28b5238fa153fd46ff57cf06f (patch)
tree6c43e2c2571d61a724c12577fbb5efba2aa701e8 /host/lib/usrp/usrp1
parentd6d51025dc83719a01b93213e3be9248a5d93b4f (diff)
downloaduhd-6aa4690af05559d28b5238fa153fd46ff57cf06f.tar.gz
uhd-6aa4690af05559d28b5238fa153fd46ff57cf06f.tar.bz2
uhd-6aa4690af05559d28b5238fa153fd46ff57cf06f.zip
usrp: added validate_subdev_spec to all io_impls
Diffstat (limited to 'host/lib/usrp/usrp1')
-rw-r--r--host/lib/usrp/usrp1/io_impl.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp
index 9de11e0ea..8e75f2025 100644
--- a/host/lib/usrp/usrp1/io_impl.cpp
+++ b/host/lib/usrp/usrp1/io_impl.cpp
@@ -15,6 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
+#include "validate_subdev_spec.hpp"
#define SRPH_DONT_CHECK_SEQUENCE
#include "../../transport/super_recv_packet_handler.hpp"
#include "../../transport/super_send_packet_handler.hpp"
@@ -260,8 +261,7 @@ void usrp1_impl::rx_stream_on_off(bool enb){
**********************************************************************/
void usrp1_impl::update_rx_subdev_spec(const uhd::usrp::subdev_spec_t &spec){
//sanity checking
- if (spec.size() == 0) throw uhd::value_error("rx subdev spec cant be empty");
- if (spec.size() > get_num_ddcs()) throw uhd::value_error("rx subdev spec too long");
+ validate_subdev_spec(_tree, spec, "rx");
_rx_subdev_spec = spec; //shadow
_io_impl->recv_handler.resize(spec.size());
@@ -282,8 +282,7 @@ void usrp1_impl::update_rx_subdev_spec(const uhd::usrp::subdev_spec_t &spec){
void usrp1_impl::update_tx_subdev_spec(const uhd::usrp::subdev_spec_t &spec){
//sanity checking
- if (spec.size() == 0) throw uhd::value_error("tx subdev spec cant be empty");
- if (spec.size() > get_num_ducs()) throw uhd::value_error("tx subdev spec too long");
+ validate_subdev_spec(_tree, spec, "tx");
_tx_subdev_spec = spec; //shadow
_io_impl->send_handler.resize(spec.size());