face+tools: fix compilation with Boost 1.69.0
Refs: #4890 Change-Id: I64c2e6ac99767fbd0b8afa9669eb6097148f8628
This commit is contained in:
1 parent
0a71dd3a00
commit
fa2aa50d8d
7 files changed
+25
-21
No files matched your search
@@ -113,7 +113,7 @@ TcpChannel::createFace(ip::tcp::socket&& socket,
|
||||
options.allowCongestionMarking = m_wantCongestionMarking;
|
||||
}
|
||||
else {
|
||||
options.allowCongestionMarking = params.wantCongestionMarking;
|
||||
options.allowCongestionMarking = bool(params.wantCongestionMarking);
|
||||
}
|
||||
|
||||
if (params.baseCongestionMarkingInterval) {
|
||||
|
||||
@@ -169,7 +169,7 @@ UdpChannel::createFace(const udp::Endpoint& remoteEndpoint,
|
||||
options.allowCongestionMarking = m_wantCongestionMarking;
|
||||
}
|
||||
else {
|
||||
options.allowCongestionMarking = params.wantCongestionMarking;
|
||||
options.allowCongestionMarking = bool(params.wantCongestionMarking);
|
||||
}
|
||||
|
||||
if (params.baseCongestionMarkingInterval) {
|
||||
|
||||
@@ -61,12 +61,12 @@ protected:
|
||||
|
||||
tribool isFound = indeterminate;
|
||||
cs.find(Interest(data.getFullName()),
|
||||
bind([&] { isFound = true; }),
|
||||
bind([&] { isFound = false; }));
|
||||
bind([&] { isFound = true; }),
|
||||
bind([&] { isFound = false; }));
|
||||
|
||||
this->advanceClocks(time::milliseconds(1));
|
||||
this->advanceClocks(1_ms);
|
||||
BOOST_REQUIRE(!indeterminate(isFound));
|
||||
return isFound;
|
||||
return bool(isFound);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
params.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, enableReliability);
|
||||
|
||||
if (!boost::logic::indeterminate(enableCongestionMarking)) {
|
||||
params.setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, enableCongestionMarking);
|
||||
params.setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, bool(enableCongestionMarking));
|
||||
}
|
||||
|
||||
createFace(params);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2017, Regents of the University of California,
|
||||
* Copyright (c) 2014-2019, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "ndn-autoconfig/procedure.hpp"
|
||||
|
||||
#include "../mock-nfd-mgmt-fixture.hpp"
|
||||
|
||||
#include <boost/logic/tribool.hpp>
|
||||
|
||||
namespace ndn {
|
||||
@@ -51,12 +52,14 @@ public:
|
||||
runOnce()
|
||||
{
|
||||
BOOST_ASSERT(procedure != nullptr);
|
||||
|
||||
boost::logic::tribool result;
|
||||
procedure->onComplete.connectSingleShot([&] (bool result1) { result = result1; });
|
||||
procedure->onComplete.connectSingleShot([&] (bool res) { result = res; });
|
||||
procedure->runOnce();
|
||||
face.processEvents();
|
||||
BOOST_CHECK_MESSAGE(!boost::logic::indeterminate(result), "onComplete is not invoked");
|
||||
return result;
|
||||
|
||||
BOOST_REQUIRE_MESSAGE(!boost::logic::indeterminate(result), "onComplete was not invoked");
|
||||
return bool(result);
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -71,7 +74,8 @@ public:
|
||||
* \param result expected result, nullopt to cause a failued
|
||||
* \param io io_service to asynchronously post the result
|
||||
*/
|
||||
DummyStage(const std::string& stageName, int* nCalls, const optional<FaceUri>& result, boost::asio::io_service& io)
|
||||
DummyStage(const std::string& stageName, int* nCalls,
|
||||
const optional<FaceUri>& result, boost::asio::io_service& io)
|
||||
: m_stageName(stageName)
|
||||
, m_nCalls(nCalls)
|
||||
, m_result(result)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2018, Regents of the University of California,
|
||||
* Copyright (c) 2014-2019, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -65,10 +65,10 @@ CsModule::config(ExecuteContext& ctx)
|
||||
p.setCapacity(*capacity);
|
||||
}
|
||||
if (!indeterminate(enableAdmit)) {
|
||||
p.setFlagBit(ndn::nfd::BIT_CS_ENABLE_ADMIT, enableAdmit);
|
||||
p.setFlagBit(ndn::nfd::BIT_CS_ENABLE_ADMIT, bool(enableAdmit));
|
||||
}
|
||||
if (!indeterminate(enableServe)) {
|
||||
p.setFlagBit(ndn::nfd::BIT_CS_ENABLE_SERVE, enableServe);
|
||||
p.setFlagBit(ndn::nfd::BIT_CS_ENABLE_SERVE, bool(enableServe));
|
||||
}
|
||||
|
||||
ctx.controller.start<ndn::nfd::CsConfigCommand>(p,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2018, Regents of the University of California,
|
||||
* Copyright (c) 2014-2019, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -203,7 +203,7 @@ FaceModule::create(ExecuteContext& ctx)
|
||||
ControlParameters params;
|
||||
params.setFaceId(respParams.getFaceId()).setFacePersistency(persistency);
|
||||
if (!boost::logic::indeterminate(lpReliability)) {
|
||||
params.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, lpReliability);
|
||||
params.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, bool(lpReliability));
|
||||
}
|
||||
ctx.controller.start<ndn::nfd::FaceUpdateCommand>(
|
||||
params,
|
||||
@@ -222,11 +222,11 @@ FaceModule::create(ExecuteContext& ctx)
|
||||
|
||||
if (!boost::logic::indeterminate(lpReliability) &&
|
||||
lpReliability != respParams.getFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED)) {
|
||||
params.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, lpReliability);
|
||||
params.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, bool(lpReliability));
|
||||
}
|
||||
if (!boost::logic::indeterminate(congestionMarking) &&
|
||||
congestionMarking != respParams.getFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED)) {
|
||||
params.setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, congestionMarking);
|
||||
params.setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, bool(congestionMarking));
|
||||
}
|
||||
|
||||
if (baseCongestionMarkingIntervalMs) {
|
||||
@@ -258,10 +258,10 @@ FaceModule::create(ExecuteContext& ctx)
|
||||
}
|
||||
params.setFacePersistency(persistency);
|
||||
if (!boost::logic::indeterminate(lpReliability)) {
|
||||
params.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, lpReliability);
|
||||
params.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, bool(lpReliability));
|
||||
}
|
||||
if (!boost::logic::indeterminate(congestionMarking)) {
|
||||
params.setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, congestionMarking);
|
||||
params.setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, bool(congestionMarking));
|
||||
}
|
||||
if (baseCongestionMarkingIntervalMs) {
|
||||
params.setBaseCongestionMarkingInterval(time::milliseconds(*baseCongestionMarkingIntervalMs));
|
||||
|
||||
Reference in new issue
Block a user