tools: nfdc face create output fix

NFD faces/create command response does not contain a Uri field,
so nfdc face create output should not try to obtain canonical
remote FaceUri from the command response.

refs #3864

Change-Id: Idae4552e0e197257ea1277e12e20fe565a8562c6
This commit is contained in:
Junxiao Shi
2017-02-10 20:50:14 +00:00
parent 8f803f292e
commit 970f648843
2 changed files with 4 additions and 5 deletions
-1
View File
@@ -118,7 +118,6 @@ BOOST_AUTO_TEST_CASE(Normal)
ControlParameters resp;
resp.setFaceId(2130)
.setUri("udp4://159.242.33.78:6363")
.setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT);
this->succeedCommand(resp);
};
+4 -4
View File
@@ -87,15 +87,15 @@ FaceModule::create(ExecuteContext& ctx)
[&] (const FaceUri& canonicalUri) {
ctx.controller.start<ndn::nfd::FaceCreateCommand>(
ControlParameters().setUri(canonicalUri.toString()).setFacePersistency(persistency),
[&] (const ControlParameters& resp) {
[&ctx, canonicalUri] (const ControlParameters& resp) {
ctx.out << "face-created ";
text::ItemAttributes ia;
ctx.out << ia("id") << resp.getFaceId()
<< ia("remote") << resp.getUri()
<< ia("remote") << canonicalUri
<< ia("persistency") << resp.getFacePersistency() << '\n';
///\todo #3864 display localUri
///\todo #3956 display local=localUri before 'remote' field
},
ctx.makeCommandFailureHandler("creating face"), ///\todo #3232 update persistency upon 409
ctx.makeCommandFailureHandler("creating face"), ///\todo #3232 upgrade persistency if necessary upon 409
ctx.makeCommandOptions());
},
[&] (const std::string& canonizeError) {