From ab1e8f24978f1cb5b06cdb180697ee449890d90a Mon Sep 17 00:00:00 2001 From: Davide Pesavento Date: Tue, 21 Oct 2014 22:45:33 +0200 Subject: [PATCH] build: Always build in C++11 mode. This commit also includes update of websocketpp submodule, as the previous version has compilation problems on OSX with XCode 6.1 Change-Id: I8c9670d0026d840838d77e610e50679ee5ede7a5 Refs: #1930, #2082 --- .jenkins.d/10-build.sh | 29 +++++++++++----- .waf-tools/default-compiler-flags.py | 37 ++++++++++++++------- .waf-tools/websocket.py | 2 +- common.hpp | 26 ++++++++------- daemon/face/face.cpp | 8 ++--- daemon/face/websocket-channel.cpp | 4 +-- daemon/table/strategy-choice.cpp | 2 +- tests/daemon/face/tcp.cpp | 18 ++++++---- tests/daemon/face/udp.cpp | 19 +++++++---- tests/daemon/mgmt/command-validator.cpp | 44 ++++++++++++------------- tests/daemon/mgmt/manager-base.cpp | 2 +- tools/ndn-autoconfig.cpp | 10 +++--- tools/ndn-tlv-peek.cpp | 14 ++++---- tools/ndn-tlv-poke.cpp | 13 ++++---- tools/nfdc.cpp | 18 +++++++--- websocketpp | 2 +- 16 files changed, 149 insertions(+), 99 deletions(-) diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh index b2881351..37246c85 100755 --- a/.jenkins.d/10-build.sh +++ b/.jenkins.d/10-build.sh @@ -6,17 +6,30 @@ git submodule init git submodule sync git submodule update -# Cleanup -sudo ./waf distclean -j1 --color=yes - -# Configure COVERAGE=$( python -c "print '--with-coverage' if 'code-coverage' in '$JOB_NAME' else ''" ) -CXXFLAGS="-std=c++03 -pedantic -Wall -Wno-long-long -O2 -g -Werror" \ - ./waf configure -j1 --color=yes --with-tests --without-pch $COVERAGE +# Cleanup +sudo ./waf -j1 --color=yes distclean -# Build -./waf --color=yes -j1 +# Configure/build in debug mode +./waf -j1 --color=yes configure --with-tests --without-pch --debug +./waf -j1 --color=yes build + +# Cleanup +sudo ./waf -j1 --color=yes distclean + +# Configure/build in optimized mode without tests with precompiled headers +./waf -j1 --color=yes configure +./waf -j1 --color=yes build + +# Cleanup +sudo ./waf -j1 --color=yes distclean + +# Configure/build in optimized mode +./waf -j1 --color=yes configure --with-tests --without-pch $COVERAGE +./waf -j1 --color=yes build + +# (tests will be run against optimized version) # Install sudo ./waf -j1 --color=yes install diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py index 97921e23..31f070ed 100644 --- a/.waf-tools/default-compiler-flags.py +++ b/.waf-tools/default-compiler-flags.py @@ -8,20 +8,14 @@ from waflib import Logs, Configure def options(opt): opt.add_option('--debug', '--with-debug', action='store_true', default=False, dest='debug', - help='''Compile in debugging mode without all optimizations (-O0)''') - opt.add_option('--with-c++11', action='store_true', default=False, dest='use_cxx11', - help='''Enable C++11 mode (experimental, may not work)''') + help='''Compile in debugging mode without optimizations (-O0 or -Og)''') def configure(conf): areCustomCxxflagsPresent = (len(conf.env.CXXFLAGS) > 0) - defaultFlags = [] - - if conf.options.use_cxx11: - defaultFlags += ['-std=c++0x', '-std=c++11'] - else: - defaultFlags += ['-std=c++03', '-Wno-variadic-macros', '-Wno-c99-extensions'] - - defaultFlags += ['-pedantic', '-Wall', '-Wno-long-long', '-Wno-unneeded-internal-declaration'] + defaultFlags = ['-std=c++0x', '-std=c++11', + '-stdlib=libc++', # clang on OSX < 10.9 by default uses gcc's + # libstdc++, which is not C++11 compatible + '-pedantic', '-Wall'] if conf.options.debug: conf.define('_DEBUG', 1) @@ -32,6 +26,7 @@ def configure(conf): '-fdiagnostics-color', # gcc >= 4.9 '-Werror', '-Wno-error=maybe-uninitialized', # Bug #1560 + '-Wno-error=unneeded-internal-declaration', # Bug #1588 ] if areCustomCxxflagsPresent: missingFlags = [x for x in defaultFlags if x not in conf.env.CXXFLAGS] @@ -46,12 +41,15 @@ def configure(conf): if not areCustomCxxflagsPresent: conf.add_supported_cxxflags(defaultFlags) + # clang on OSX < 10.9 by default uses gcc's libstdc++, which is not C++11 compatible + conf.add_supported_linkflags(['-stdlib=libc++']) + @Configure.conf def add_supported_cxxflags(self, cxxflags): """ Check which cxxflags are supported by compiler and add them to env.CXXFLAGS variable """ - self.start_msg('Checking allowed flags for c++ compiler') + self.start_msg('Checking supported CXXFLAGS') supportedFlags = [] for flag in cxxflags: @@ -60,3 +58,18 @@ def add_supported_cxxflags(self, cxxflags): self.end_msg(' '.join(supportedFlags)) self.env.CXXFLAGS = supportedFlags + self.env.CXXFLAGS + +@Configure.conf +def add_supported_linkflags(self, linkflags): + """ + Check which linkflags are supported by compiler and add them to env.LINKFLAGS variable + """ + self.start_msg('Checking supported LINKFLAGS') + + supportedFlags = [] + for flag in linkflags: + if self.check_cxx(linkflags=['-Werror', flag], mandatory=False): + supportedFlags += [flag] + + self.end_msg(' '.join(supportedFlags)) + self.env.LINKFLAGS = supportedFlags + self.env.LINKFLAGS diff --git a/.waf-tools/websocket.py b/.waf-tools/websocket.py index 77de3737..c5b33842 100644 --- a/.waf-tools/websocket.py +++ b/.waf-tools/websocket.py @@ -71,7 +71,7 @@ def checkWebsocket(self, **kw): Logs.warn(' git submodule init && git submodule update') Logs.warn('Otherwise, manually download and extract websocketpp library:') Logs.warn(' mkdir websocketpp') - Logs.warn(' curl -L https://github.com/zaphoyd/websocketpp/tarball/e203dbed45409111c2e95cb3e4a1d178ee57d2bc > websocket.tar.gz') + Logs.warn(' curl -L https://github.com/zaphoyd/websocketpp/tarball/4309749dd98937b8a7be5dc0bfe679ba201c5512 > websocket.tar.gz') Logs.warn(' tar zxf websocket.tar.gz -C websocketpp/ --strip 1') Logs.warn('Alternatively, WebSocket support can be disabled with --without-websocket') self.fatal("The configuration failed") diff --git a/common.hpp b/common.hpp index cf236cad..0271006d 100644 --- a/common.hpp +++ b/common.hpp @@ -65,17 +65,21 @@ using std::size_t; using boost::noncopyable; using boost::scoped_ptr; -using ndn::shared_ptr; -using ndn::weak_ptr; -using ndn::enable_shared_from_this; -using ndn::make_shared; -using ndn::static_pointer_cast; -using ndn::dynamic_pointer_cast; -using ndn::const_pointer_cast; -using ndn::function; -using ndn::bind; -using ndn::ref; -using ndn::cref; +using std::shared_ptr; +using std::unique_ptr; +using std::weak_ptr; +using std::bad_weak_ptr; +using std::make_shared; +using std::enable_shared_from_this; + +using std::static_pointer_cast; +using std::dynamic_pointer_cast; +using std::const_pointer_cast; + +using std::function; +using std::bind; +using std::ref; +using std::cref; using ndn::Interest; using ndn::Data; diff --git a/daemon/face/face.cpp b/daemon/face/face.cpp index f3757ff6..7d3c1b71 100644 --- a/daemon/face/face.cpp +++ b/daemon/face/face.cpp @@ -36,10 +36,10 @@ Face::Face(const FaceUri& remoteUri, const FaceUri& localUri, bool isLocal) , m_isOnDemand(false) , m_isFailed(false) { - onReceiveInterest += bind(&PacketCounter::operator++, &m_counters.getNInInterests()); - onReceiveData += bind(&PacketCounter::operator++, &m_counters.getNInDatas()); - onSendInterest += bind(&PacketCounter::operator++, &m_counters.getNOutInterests()); - onSendData += bind(&PacketCounter::operator++, &m_counters.getNOutDatas()); + onReceiveInterest += [this](const ndn::Interest&) { ++m_counters.getNInInterests(); }; + onReceiveData += [this](const ndn::Data&) { ++m_counters.getNInDatas(); }; + onSendInterest += [this](const ndn::Interest&) { ++m_counters.getNOutInterests(); }; + onSendData += [this](const ndn::Data&) { ++m_counters.getNOutDatas(); }; } Face::~Face() diff --git a/daemon/face/websocket-channel.cpp b/daemon/face/websocket-channel.cpp index d6cf64b9..a16ee645 100644 --- a/daemon/face/websocket-channel.cpp +++ b/daemon/face/websocket-channel.cpp @@ -115,8 +115,8 @@ WebSocketChannel::handleOpen(websocketpp::connection_hdl hdl) websocketpp::lib::error_code ecode; m_server.close(hdl, websocketpp::close::status::normal, "closed by channel", ecode); } - shared_ptr face = make_shared(FaceUri(remote), this->getUri(), - hdl, ref(m_server)); + shared_ptr face = ndn::make_shared(FaceUri(remote), this->getUri(), + hdl, ref(m_server)); m_onFaceCreatedCallback(face); m_channelFaces[hdl] = face; diff --git a/daemon/table/strategy-choice.cpp b/daemon/table/strategy-choice.cpp index eedbc914..c6d45ad7 100644 --- a/daemon/table/strategy-choice.cpp +++ b/daemon/table/strategy-choice.cpp @@ -158,7 +158,7 @@ StrategyChoice::get(const Name& prefix) const return shared_ptr(); } - return make_shared(entry->getStrategy().getName()); + return make_shared(entry->getStrategy().getName()); } static inline bool diff --git a/tests/daemon/face/tcp.cpp b/tests/daemon/face/tcp.cpp index 7b0a77d9..a87c5dc8 100644 --- a/tests/daemon/face/tcp.cpp +++ b/tests/daemon/face/tcp.cpp @@ -234,6 +234,16 @@ public: BOOST_CHECK_EQUAL(faces.size(), shouldBe); } + void + connect(const shared_ptr& channel, + const std::string& remoteHost, + const std::string& remotePort) + { + channel->connect(remoteHost, remotePort, + bind(&EndToEndFixture::channel_onFaceCreated, this, _1), + bind(&EndToEndFixture::channel_onConnectFailed, this, _1)); + } + public: LimitedIo limitedIo; @@ -431,13 +441,7 @@ BOOST_FIXTURE_TEST_CASE(MultipleAccepts, EndToEndFixture) BOOST_CHECK_NE(channel3, channel4); scheduler::schedule(time::seconds(1), - bind(&TcpChannel::connect, channel4, "127.0.0.1", "20070", - // does not work without static_cast - static_cast( - bind(&EndToEndFixture::channel_onFaceCreated, this, _1)), - static_cast( - bind(&EndToEndFixture::channel_onConnectFailed, this, _1)), - time::seconds(4))); + bind(&EndToEndFixture::connect, this, channel4, "127.0.0.1", "20070")); scheduler::schedule(time::milliseconds(500), bind(&EndToEndFixture::checkFaceList, this, 4)); diff --git a/tests/daemon/face/udp.cpp b/tests/daemon/face/udp.cpp index 503ec746..87ee8f06 100644 --- a/tests/daemon/face/udp.cpp +++ b/tests/daemon/face/udp.cpp @@ -379,7 +379,7 @@ public: void channel_onConnectFailedOk(const std::string& reason) { - //it's ok, it was supposed to fail + // it's ok, it was supposed to fail limitedIo.afterOp(); } @@ -389,6 +389,16 @@ public: BOOST_CHECK_EQUAL(faces.size(), shouldBe); } + void + connect(const shared_ptr& channel, + const std::string& remoteHost, + const std::string& remotePort) + { + channel->connect(remoteHost, remotePort, + bind(&EndToEndFixture::channel_onFaceCreated, this, _1), + bind(&EndToEndFixture::channel_onConnectFailed, this, _1)); + } + public: LimitedIo limitedIo; @@ -640,12 +650,7 @@ BOOST_FIXTURE_TEST_CASE(MultipleAccepts, EndToEndFixture) BOOST_CHECK_NE(channel3, channel4); scheduler::schedule(time::milliseconds(500), - bind(&UdpChannel::connect, channel4, "127.0.0.1", "20070", - // does not work without static_cast - static_cast( - bind(&EndToEndFixture::channel_onFaceCreated, this, _1)), - static_cast( - bind(&EndToEndFixture::channel_onConnectFailed, this, _1)))); + bind(&EndToEndFixture::connect, this, channel4, "127.0.0.1", "20070")); scheduler::schedule(time::milliseconds(400), bind(&EndToEndFixture::checkFaceList, this, 2)); diff --git a/tests/daemon/mgmt/command-validator.cpp b/tests/daemon/mgmt/command-validator.cpp index 5e1dd300..ac32a6e9 100644 --- a/tests/daemon/mgmt/command-validator.cpp +++ b/tests/daemon/mgmt/command-validator.cpp @@ -230,21 +230,21 @@ BOOST_FIXTURE_TEST_CASE(TwoKeys, TwoValidatorFixture) config.parse(CONFIG, false, CONFIG_PATH.native()); validator.validate(*fibCommand, - bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1), - bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2)); + bind(&CommandValidatorTester::onValidated, &m_tester1, _1), + bind(&CommandValidatorTester::onValidationFailed, &m_tester1, _1, _2)); BOOST_REQUIRE(m_tester1.commandValidated()); m_tester1.resetValidation(); validator.validate(*statsCommand, - bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1), - bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2)); + bind(&CommandValidatorTester::onValidated, &m_tester1, _1), + bind(&CommandValidatorTester::onValidationFailed, &m_tester1, _1, _2)); BOOST_REQUIRE(m_tester1.commandValidated()); validator.validate(*facesCommand, - bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1), - bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2)); + bind(&CommandValidatorTester::onValidated, &m_tester2, _1), + bind(&CommandValidatorTester::onValidationFailed, &m_tester2, _1, _2)); BOOST_REQUIRE(m_tester2.commandValidated()); m_tester2.resetValidation(); @@ -254,8 +254,8 @@ BOOST_FIXTURE_TEST_CASE(TwoKeys, TwoValidatorFixture) generator.generateWithIdentity(*unauthorizedFibCommand, m_tester2.getIdentityName()); validator.validate(*unauthorizedFibCommand, - bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1), - bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2)); + bind(&CommandValidatorTester::onValidated, &m_tester2, _1), + bind(&CommandValidatorTester::onValidationFailed, &m_tester2, _1, _2)); BOOST_REQUIRE(m_tester2.commandValidationFailed()); } @@ -290,21 +290,21 @@ BOOST_FIXTURE_TEST_CASE(TwoKeysDryRun, TwoValidatorFixture) config.parse(CONFIG, true, CONFIG_PATH.native()); validator.validate(*fibCommand, - bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1), - bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2)); + bind(&CommandValidatorTester::onValidated, &m_tester1, _1), + bind(&CommandValidatorTester::onValidationFailed, &m_tester1, _1, _2)); BOOST_REQUIRE(m_tester1.commandValidationFailed()); m_tester1.resetValidation(); validator.validate(*statsCommand, - bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1), - bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2)); + bind(&CommandValidatorTester::onValidated, &m_tester1, _1), + bind(&CommandValidatorTester::onValidationFailed, &m_tester1, _1, _2)); BOOST_REQUIRE(m_tester1.commandValidationFailed()); validator.validate(*facesCommand, - bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1), - bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2)); + bind(&CommandValidatorTester::onValidated, &m_tester2, _1), + bind(&CommandValidatorTester::onValidationFailed, &m_tester2, _1, _2)); BOOST_REQUIRE(m_tester2.commandValidationFailed()); m_tester2.resetValidation(); @@ -314,8 +314,8 @@ BOOST_FIXTURE_TEST_CASE(TwoKeysDryRun, TwoValidatorFixture) generator.generateWithIdentity(*unauthorizedFibCommand, m_tester2.getIdentityName()); validator.validate(*unauthorizedFibCommand, - bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1), - bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2)); + bind(&CommandValidatorTester::onValidated, &m_tester2, _1), + bind(&CommandValidatorTester::onValidationFailed, &m_tester2, _1, _2)); BOOST_REQUIRE(m_tester2.commandValidationFailed()); } @@ -629,22 +629,22 @@ BOOST_FIXTURE_TEST_CASE(Wildcard, TwoValidatorFixture) config.parse(WILDCARD_CERT_CONFIG, false, CONFIG_PATH.native()); validator.validate(*fibCommand, - bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1), - bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2)); + bind(&CommandValidatorTester::onValidated, &m_tester1, _1), + bind(&CommandValidatorTester::onValidationFailed, &m_tester1, _1, _2)); BOOST_REQUIRE(m_tester1.commandValidationFailed()); m_tester1.resetValidation(); validator.validate(*statsCommand, - bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1), - bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2)); + bind(&CommandValidatorTester::onValidated, &m_tester1, _1), + bind(&CommandValidatorTester::onValidationFailed, &m_tester1, _1, _2)); BOOST_REQUIRE(m_tester1.commandValidated()); m_tester1.resetValidation(); validator.validate(*facesCommand, - bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1), - bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2)); + bind(&CommandValidatorTester::onValidated, &m_tester1, _1), + bind(&CommandValidatorTester::onValidationFailed, &m_tester1, _1, _2)); BOOST_REQUIRE(m_tester1.commandValidated()); m_tester1.resetValidation(); diff --git a/tests/daemon/mgmt/manager-base.cpp b/tests/daemon/mgmt/manager-base.cpp index 58a6fd4f..5d2b6c34 100644 --- a/tests/daemon/mgmt/manager-base.cpp +++ b/tests/daemon/mgmt/manager-base.cpp @@ -80,7 +80,7 @@ public: shared_ptr getInternalFace() { - return ndn::ptr_lib::static_pointer_cast(m_face); + return static_pointer_cast(m_face); } void diff --git a/tools/ndn-autoconfig.cpp b/tools/ndn-autoconfig.cpp index 71bca2f4..87fd8846 100644 --- a/tools/ndn-autoconfig.cpp +++ b/tools/ndn-autoconfig.cpp @@ -103,8 +103,8 @@ public: finalBlockId.toSegment() > currentSegment) { m_face.expressInterest(data.getName().getPrefix(-1).appendSegment(currentSegment+1), - bind(&NdnAutoconfig::fetchSegments, this, _2, buffer, onDone), - bind(&NdnAutoconfig::discoverHubStage2, this, "Timeout")); + ndn::bind(&NdnAutoconfig::fetchSegments, this, _2, buffer, onDone), + ndn::bind(&NdnAutoconfig::discoverHubStage2, this, "Timeout")); } else { @@ -122,9 +122,9 @@ public: interest.setMustBeFresh(true); m_face.expressInterest(interest, - bind(&NdnAutoconfig::fetchSegments, this, _2, buffer, - &NdnAutoconfig::discoverHubStage1_registerHubDiscoveryPrefix), - bind(&NdnAutoconfig::discoverHubStage2, this, "Timeout")); + ndn::bind(&NdnAutoconfig::fetchSegments, this, _2, buffer, + &NdnAutoconfig::discoverHubStage1_registerHubDiscoveryPrefix), + ndn::bind(&NdnAutoconfig::discoverHubStage2, this, "Timeout")); } void diff --git a/tools/ndn-tlv-peek.cpp b/tools/ndn-tlv-peek.cpp index dc701756..dca57e01 100644 --- a/tools/ndn-tlv-peek.cpp +++ b/tools/ndn-tlv-peek.cpp @@ -27,15 +27,19 @@ #include "version.hpp" -#include +#include #include namespace ndntlvpeek { -class NdnTlvPeek +using ndn::_1; +using ndn::_2; + +class NdnTlvPeek : boost::noncopyable { public: + explicit NdnTlvPeek(char* programName) : m_programName(programName) , m_mustBeFresh(false) @@ -180,10 +184,8 @@ public: try { m_face.expressInterest(createInterestPacket(), - ndn::func_lib::bind(&NdnTlvPeek::onData, - this, _1, _2), - ndn::func_lib::bind(&NdnTlvPeek::onTimeout, - this, _1)); + bind(&NdnTlvPeek::onData, this, _1, _2), + bind(&NdnTlvPeek::onTimeout, this, _1)); if (m_timeout < ndn::time::milliseconds::zero()) { if (m_interestLifetime < ndn::time::milliseconds::zero()) diff --git a/tools/ndn-tlv-poke.cpp b/tools/ndn-tlv-poke.cpp index 3f5a3b61..31ec5618 100644 --- a/tools/ndn-tlv-poke.cpp +++ b/tools/ndn-tlv-poke.cpp @@ -27,18 +27,19 @@ #include "version.hpp" -#include +#include #include #include namespace ndntlvpoke { +using ndn::_1; +using ndn::_2; + class NdnTlvPoke : boost::noncopyable { - public: - explicit NdnTlvPoke(char* programName) : m_programName(programName) @@ -186,11 +187,9 @@ public: else { m_face.setInterestFilter(m_prefixName, - ndn::bind(&NdnTlvPoke::onInterest, - this, _1, _2, dataPacket), + bind(&NdnTlvPoke::onInterest, this, _1, _2, dataPacket), ndn::RegisterPrefixSuccessCallback(), - ndn::bind(&NdnTlvPoke::onRegisterFailed, - this, _1, _2)); + bind(&NdnTlvPoke::onRegisterFailed, this, _1, _2)); } if (m_timeout < ndn::time::milliseconds::zero()) m_face.processEvents(getDefaultTimeout()); diff --git a/tools/nfdc.cpp b/tools/nfdc.cpp index 123cdb58..4ef98bf8 100644 --- a/tools/nfdc.cpp +++ b/tools/nfdc.cpp @@ -70,6 +70,10 @@ usage(const char* programName) namespace nfdc { +using ndn::bind; +using ndn::_1; +using ndn::_2; + const ndn::time::milliseconds Nfdc::DEFAULT_EXPIRATION_PERIOD = ndn::time::milliseconds::max(); const uint64_t Nfdc::DEFAULT_COST = 0; @@ -186,9 +190,11 @@ Nfdc::startFibAddNextHop(const ndn::util::FaceUri& canonicalUri) parameters.setUri(canonicalUri.toString()); m_controller.start(parameters, - bind(&Nfdc::fibAddNextHop, this, _1), + [this](const ControlParameters& result) { + fibAddNextHop(result); + }, bind(&Nfdc::onError, this, _1, _2, - "Face creation failed")); + "Face creation failed")); } void @@ -273,7 +279,9 @@ Nfdc::startRibRegisterPrefix(const ndn::util::FaceUri& canonicalUri) parameters.setUri(canonicalUri.toString()); m_controller.start(parameters, - bind(&Nfdc::ribRegisterPrefix, this, _1), + [this](const ControlParameters& result) { + ribRegisterPrefix(result); + }, bind(&Nfdc::onError, this, _1, _2, "Face creation failed")); } @@ -389,7 +397,9 @@ Nfdc::startFaceDestroy(const ndn::util::FaceUri& canonicalUri) parameters.setUri(canonicalUri.toString()); m_controller.start(parameters, - bind(&Nfdc::faceDestroy, this, _1), + [this](const ControlParameters& result) { + faceDestroy(result); + }, bind(&Nfdc::onError, this, _1, _2, "Face destroy failed")); } diff --git a/websocketpp b/websocketpp index e203dbed..4309749d 160000 --- a/websocketpp +++ b/websocketpp @@ -1 +1 @@ -Subproject commit e203dbed45409111c2e95cb3e4a1d178ee57d2bc +Subproject commit 4309749dd98937b8a7be5dc0bfe679ba201c5512