Commit 4254960b authored by Francis Dupont's avatar Francis Dupont Committed by Michal Nowikowski

[283-perfdhcp-indicated-requests-rate-is-not-kept-during-testing] Minimal...

[283-perfdhcp-indicated-requests-rate-is-not-kept-during-testing] Minimal fixes to make it to build on macOS
parent 552e8267
......@@ -21,7 +21,7 @@ Receiver::start() {
return;
}
assert(run_flag_.test_and_set() == false);
recv_thread_ = move(unique_ptr<thread>(new thread{&Receiver::run, this}));
recv_thread_.reset(new thread{&Receiver::run, this});
}
void
......
......@@ -37,9 +37,11 @@ typedef boost::shared_ptr<Pkt> PktPtr;
/// in main thread packets can be consumed from the queue using getPkt
/// method.
class Receiver {
public:
/// \brief Socket for receiving.
const BetterSocket& socket_;
private:
/// \brief Flag indicating if thread should run (true) or not (false).
boost::atomic_flag run_flag_;
......
......@@ -1238,7 +1238,7 @@ TestControl::processReceivedPacket6(const BetterSocket& socket,
void
TestControl::consumeReceivedPackets(Receiver& receiver, const BetterSocket& socket) {
PktPtr pkt;
while (pkt = receiver.getPkt()) {
while ((pkt = receiver.getPkt())) {
if (CommandOptions::instance().getIpVersion() == 4) {
Pkt4Ptr pkt4 = boost::dynamic_pointer_cast<Pkt4>(pkt);
processReceivedPacket4(socket, pkt4);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment