From: Johnathan Corgan Date: Mon, 18 Jan 2010 04:18:59 +0000 (-0800) Subject: usrp2: fix for 'start_rx_streaming_at' hang X-Git-Url: https://git.gag.com/?p=debian%2Fgnuradio;a=commitdiff_plain;h=165f4bc50ee64b36bae8c3c0d87b366da6fddc03 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. --- diff --git a/usrp2/host/lib/usrp2_impl.cc b/usrp2/host/lib/usrp2_impl.cc index a7470763..b19c6ecf 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; }