From 5dca9e6315c5f827d97351316e5bdd3a786dc4f1 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 30 Jul 2010 11:16:58 -0700 Subject: usrp2: stop streaming and drain buffer (if left running) --- host/lib/usrp/usrp2/mboard_impl.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp') diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp index 0ac988361..3d103c940 100644 --- a/host/lib/usrp/usrp2/mboard_impl.cpp +++ b/host/lib/usrp/usrp2/mboard_impl.cpp @@ -98,6 +98,11 @@ usrp2_mboard_impl::usrp2_mboard_impl( //init the tx and rx dboards (do last) dboard_init(); + + //Issue a stop streaming command (in case it was left running). + //Since this command is issued before the networking is setup, + //most if not all junk packets will never make it to the socket. + this->issue_ddc_stream_cmd(stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS); } usrp2_mboard_impl::~usrp2_mboard_impl(void){ -- cgit v1.2.3