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
diff --git a/tests/tools/nfdc/face-module.t.cpp b/tests/tools/nfdc/face-module.t.cpp
index 308196d..81ea707 100644
--- a/tests/tools/nfdc/face-module.t.cpp
+++ b/tests/tools/nfdc/face-module.t.cpp
@@ -118,7 +118,6 @@
ControlParameters resp;
resp.setFaceId(2130)
- .setUri("udp4://159.242.33.78:6363")
.setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT);
this->succeedCommand(resp);
};
diff --git a/tools/nfdc/face-module.cpp b/tools/nfdc/face-module.cpp
index e96de3e..982af63 100644
--- a/tools/nfdc/face-module.cpp
+++ b/tools/nfdc/face-module.cpp
@@ -87,15 +87,15 @@
[&] (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) {