diff options
author | Josh Blum <josh@joshknows.com> | 2010-06-18 12:33:36 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-06-18 12:33:36 -0700 |
commit | df80be9c61d95402976d3349acf62630044c1939 (patch) | |
tree | 349da246fb6e13f859797242e67a4355a9fbd0ea /host/lib/usrp/usrp2/usrp2_impl.cpp | |
parent | e16adfd201a4a51d9fbd7e1be45cd8d9b33177f5 (diff) | |
parent | a950a544f5c3beb7430a0748b7e76fd6cb713514 (diff) | |
download | uhd-df80be9c61d95402976d3349acf62630044c1939.tar.gz uhd-df80be9c61d95402976d3349acf62630044c1939.tar.bz2 uhd-df80be9c61d95402976d3349acf62630044c1939.zip |
Merge branch 'i2c_resize' into pre_merge
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index 0837f4ac4..36c264c3c 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -79,12 +79,12 @@ uhd::device_addrs_t usrp2::find(const device_addr_t &hint){ udp_transport->send(boost::asio::buffer(&ctrl_data_out, sizeof(ctrl_data_out))); //loop and recieve until the timeout - boost::uint8_t usrp2_ctrl_data_in_mem[1500]; //allocate MTU bytes for recv + boost::uint8_t usrp2_ctrl_data_in_mem[USRP2_UDP_BYTES]; //allocate max bytes for recv usrp2_ctrl_data_t *ctrl_data_in = reinterpret_cast<usrp2_ctrl_data_t *>(usrp2_ctrl_data_in_mem); while(true){ size_t len = udp_transport->recv(asio::buffer(usrp2_ctrl_data_in_mem)); //std::cout << len << "\n"; - if (len >= sizeof(usrp2_ctrl_data_t)){ + if (len > offsetof(usrp2_ctrl_data_t, data)){ //handle the received data switch(ntohl(ctrl_data_in->id)){ case USRP2_CTRL_ID_WAZZUP_DUDE: |