aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/usrp2_iface.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-04-13 10:04:42 -0700
committerJosh Blum <josh@joshknows.com>2011-04-13 10:04:42 -0700
commitf9e1f06e81109573d2e600a18c288aafd1438f64 (patch)
treefd544730caea96a621c9f35b02c268958ca48709 /host/lib/usrp/usrp2/usrp2_iface.cpp
parent2f102fbff2b7245d3d038e7dfffaa2de856b61aa (diff)
downloaduhd-f9e1f06e81109573d2e600a18c288aafd1438f64.tar.gz
uhd-f9e1f06e81109573d2e600a18c288aafd1438f64.tar.bz2
uhd-f9e1f06e81109573d2e600a18c288aafd1438f64.zip
usrp2: add check for holler protocol, we can support backwards
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_iface.cpp')
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index 227233917..6e1d69044 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -248,7 +248,7 @@ public:
while(true){
size_t len = _ctrl_transport->recv(boost::asio::buffer(usrp2_ctrl_data_in_mem), CTRL_RECV_TIMEOUT);
boost::uint32_t compat = ntohl(ctrl_data_in->proto_ver);
- if(len >= sizeof(boost::uint32_t) and hi >= compat and lo <= compat){
+ if(len >= sizeof(boost::uint32_t) and (hi < compat or lo > compat)){
throw uhd::runtime_error(str(boost::format(
"Expected protocol compatibility number %s, but got %d:\n"
"The firmware build is not compatible with the host code build."