diff options
author | Josh Blum <josh@joshknows.com> | 2011-05-04 15:27:11 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-05-04 15:27:11 -0700 |
commit | c8dca30d72eb733d154ab9dd193631c42b8e4788 (patch) | |
tree | ded51d25f2cbdd319e28f9af906620d7efc412ff /host/lib/transport/udp_zero_copy.cpp | |
parent | 94399062713a76a42f269a7ed4d3737ecd6ed5cf (diff) | |
download | uhd-c8dca30d72eb733d154ab9dd193631c42b8e4788.tar.gz uhd-c8dca30d72eb733d154ab9dd193631c42b8e4788.tar.bz2 uhd-c8dca30d72eb733d154ab9dd193631c42b8e4788.zip |
uhd: replaced many conditional prints with UHD_LOG usage
Diffstat (limited to 'host/lib/transport/udp_zero_copy.cpp')
-rw-r--r-- | host/lib/transport/udp_zero_copy.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/host/lib/transport/udp_zero_copy.cpp b/host/lib/transport/udp_zero_copy.cpp index 5810f441c..15d882676 100644 --- a/host/lib/transport/udp_zero_copy.cpp +++ b/host/lib/transport/udp_zero_copy.cpp @@ -21,8 +21,8 @@ #include <uhd/transport/bounded_buffer.hpp> #include <uhd/transport/buffer_pool.hpp> #include <uhd/utils/warning.hpp> +#include <uhd/utils/log.hpp> #include <boost/format.hpp> -#include <iostream> #include <list> using namespace uhd; @@ -131,7 +131,7 @@ public: _pending_recv_buffs(_num_recv_frames), _pending_send_buffs(_num_send_frames) { - //std::cout << boost::format("Creating udp transport for %s %s") % addr % port << std::endl; + UHD_LOG << boost::format("Creating udp transport for %s %s") % addr % port << std::endl; //resolve the address asio::ip::udp::resolver resolver(_io_service); @@ -275,17 +275,16 @@ template<typename Opt> static void resize_buff_helper( //resize the buffer if size was provided if (target_size > 0){ size_t actual_size = udp_trans->resize_buff<Opt>(target_size); - if (target_size != actual_size) std::cout << boost::format( + UHD_LOG << boost::format( "Target %s sock buff size: %d bytes\n" "Actual %s sock buff size: %d bytes" ) % name % target_size % name % actual_size << std::endl; - else std::cout << boost::format( - "Current %s sock buff size: %d bytes" - ) % name % actual_size << std::endl; if (actual_size < target_size) uhd::warning::post(str(boost::format( "The %s buffer could not be resized sufficiently.\n" + "Target sock buff size: %d bytes.\n" + "Actual sock buff size: %d bytes.\n" "See the transport application notes on buffer resizing.\n%s" - ) % name % help_message)); + ) % name % target_size % actual_size % help_message)); } } |