Actions
Bug #1356
closedFace::setInterestFilter likely to fail if setController has been called
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
03/14/2014
Due date:
% Done:
100%
Estimated time:
Description
Environment: Ubuntu 12.04
ndn-cpp-dev commit c145d492e98ffc7949a80c551bc7188afd074635
NFD commit eee71fd6bca6e49115989a64ac75bfc71b324e5d
Steps to reproduce:
- in NFD configuration file, grant
fib
privilege to default identity - start NFD, and wait about 5 seconds
run program
NFD=1 ./a.out
// g++ set-controller.cpp -lndn-cpp-dev -pthread -lboost_system -lboost_filesystem -lcrypto -lcryptopp -lsqlite3 -lrt #include <ndn-cpp-dev/face.hpp> #include <ndn-cpp-dev/management/nfd-controller.hpp> using ndn::Name; using ndn::Interest; using ndn::Face; void onInterest(const Name& name, const Interest& interest) { std::cout << "interest " << interest.getName() << std::endl; } void onRegisterFailed(const Name& prefix, const std::string& reason) { std::cout << prefix << " fail " << reason << std::endl; } int main() { Face face; face.setController(boost::make_shared<ndn::nfd::Controller>(boost::ref(face))); face.setInterestFilter("/localhost/set-controller", &onInterest, &onRegisterFailed); face.processEvents(); return 0; }
if "/localhost/set-controller fail Unauthorized command" appears, terminate and run the program again
Expected: no error message
Actual: "Unauthorized command" occurs about 4~7 times
Note: if face.setController
line is commented out, "Unauthorized command" occurs 2~3 times
Note: if "Unauthorized command" stops appearing, subsequent execution of the program won't have this error message
Actions