diff options
author | Michael Dickens <michael.dickens@ettus.com> | 2020-02-20 13:52:47 -0500 |
---|---|---|
committer | atrnati <54334261+atrnati@users.noreply.github.com> | 2020-02-21 09:53:51 -0600 |
commit | c42776f97b126b71a13bb8339988cda09203f589 (patch) | |
tree | 00d61ad15471c0bc8387bdf8ffd7515aec03804e /host/lib | |
parent | 84bc3a9912f956681adbb90bca51afa2199b0969 (diff) | |
download | uhd-c42776f97b126b71a13bb8339988cda09203f589.tar.gz uhd-c42776f97b126b71a13bb8339988cda09203f589.tar.bz2 uhd-c42776f97b126b71a13bb8339988cda09203f589.zip |
lib: move OSX specific code to where the values are initially set
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/include/uhdlib/transport/udp_common.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/transport/udp_common.hpp b/host/lib/include/uhdlib/transport/udp_common.hpp index c094fb142..e17deff9e 100644 --- a/host/lib/include/uhdlib/transport/udp_common.hpp +++ b/host/lib/include/uhdlib/transport/udp_common.hpp @@ -268,6 +268,17 @@ inline link_params_t calculate_udp_link_params( link_args.cast<size_t>("recv_buff_size", link_params.recv_buff_size); } +#if defined(UHD_PLATFORM_MACOS) || defined(UHD_PLATFORM_BSD) + // limit buffer size on OSX to avoid the warning issued by + // resize_buff_helper + if (link_params.recv_buff_size > MAX_BUFF_SIZE_ETH_MACOS) { + link_params.recv_buff_size = MAX_BUFF_SIZE_ETH_MACOS; + } + if (link_params.send_buff_size > MAX_BUFF_SIZE_ETH_MACOS) { + link_params.send_buff_size = MAX_BUFF_SIZE_ETH_MACOS; + } +#endif + return link_params; } |