diff options
author | Josh Blum <josh@joshknows.com> | 2010-12-29 17:47:56 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-12-29 17:47:56 -0800 |
commit | 35305471506e344a214cbabda4b9d0adbfcb51a1 (patch) | |
tree | 150fa88e094be3bd2766ed4f9e676ada546db68b | |
parent | a86bdc1ab187d075d76f8640ff2ea4c69b1d28e6 (diff) | |
download | uhd-35305471506e344a214cbabda4b9d0adbfcb51a1.tar.gz uhd-35305471506e344a214cbabda4b9d0adbfcb51a1.tar.bz2 uhd-35305471506e344a214cbabda4b9d0adbfcb51a1.zip |
udp: tweak warning on socket resize
-rw-r--r-- | host/lib/transport/udp_zero_copy_asio.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/host/lib/transport/udp_zero_copy_asio.cpp b/host/lib/transport/udp_zero_copy_asio.cpp index bbd63836c..12695893e 100644 --- a/host/lib/transport/udp_zero_copy_asio.cpp +++ b/host/lib/transport/udp_zero_copy_asio.cpp @@ -322,12 +322,13 @@ private: **********************************************************************/ template<typename Opt> static void resize_buff_helper( udp_zero_copy_asio_impl::sptr udp_trans, - size_t target_size, + const size_t target_size, const std::string &name ){ size_t min_sock_buff_size = 0; if (name == "recv") min_sock_buff_size = MIN_RECV_SOCK_BUFF_SIZE; if (name == "send") min_sock_buff_size = MIN_SEND_SOCK_BUFF_SIZE; + min_sock_buff_size = std::max(min_sock_buff_size, target_size); std::string help_message; #if defined(UHD_PLATFORM_LINUX) @@ -348,7 +349,7 @@ template<typename Opt> static void resize_buff_helper( ) % name % actual_size << std::endl; if (actual_size < target_size) uhd::warning::post(str(boost::format( "The %s buffer is smaller than the requested size.\n" - "The minimum recommended buffer size is %d bytes.\n" + "The minimum requested buffer size is %d bytes.\n" "See the transport application notes on buffer resizing.\n%s" ) % name % min_sock_buff_size % help_message)); } |