summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnathan Corgan <jcorgan@corganenterprises.com>2010-01-17 20:18:59 -0800
committerJohnathan Corgan <jcorgan@corganenterprises.com>2010-01-17 20:18:59 -0800
commit165f4bc50ee64b36bae8c3c0d87b366da6fddc03 (patch)
tree0586159859f3f1552a6671f92d31b33729ba41d7
parent419ffcfea1c886d71cbb0eaac590aa1f5a088495 (diff)
usrp2: fix for 'start_rx_streaming_at' hang
The start_rx_streaming_at call was not clearing the d_dont_enqueue flag, resulting in the receiver loop discarding data packets.
-rw-r--r--usrp2/host/lib/usrp2_impl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/usrp2/host/lib/usrp2_impl.cc b/usrp2/host/lib/usrp2_impl.cc
index a74707634c..b19c6ecf19 100644
--- a/usrp2/host/lib/usrp2_impl.cc
+++ b/usrp2/host/lib/usrp2_impl.cc
@@ -705,6 +705,7 @@ namespace usrp2 {
cmd.eop.opcode = OP_EOP;
cmd.eop.len = sizeof(cmd.eop);
+ d_dont_enqueue = false;
bool success = false;
pending_reply p(cmd.op.rid, &reply, sizeof(reply));
success = transmit_cmd_and_wait(&cmd, sizeof(cmd), &p, DEF_CMD_TIMEOUT);
@@ -712,6 +713,8 @@ namespace usrp2 {
if (success)
d_channel_rings[channel] = ring_sptr(new ring(d_eth_buf->max_frames()));
+ else
+ d_dont_enqueue = true;
return success;
}
@@ -759,6 +762,7 @@ namespace usrp2 {
cmd.eop.opcode = OP_EOP;
cmd.eop.len = sizeof(cmd.eop);
+ d_dont_enqueue = false;
bool success = false;
pending_reply p(cmd.sync_op.rid, &reply, sizeof(reply));
success = transmit_cmd_and_wait(&cmd, sizeof(cmd), &p, DEF_CMD_TIMEOUT);
@@ -766,6 +770,8 @@ namespace usrp2 {
if (success)
d_channel_rings[channel] = ring_sptr(new ring(d_eth_buf->max_frames()));
+ else
+ d_dont_enqueue = true;
return success;
}