adjust client command line tool to reflect the library change
Change-Id: Ie0628470b5b96848b930d131ad92fd196de8f64c
diff --git a/src/ca-module.cpp b/src/ca-module.cpp
index f12011e..715fe1d 100644
--- a/src/ca-module.cpp
+++ b/src/ca-module.cpp
@@ -478,20 +478,19 @@
const JsonSection
CaModule::genProbeResponseJson(const Name& identifier, const std::string& m_probe, const JsonSection& parameterJson)
{
- std::vector<std::string> fields;
- std::string delimiter = ":";
- size_t last = 0;
- size_t next = 0;
- while ((next = m_probe.find(delimiter, last)) != std::string::npos) {
- fields.push_back(m_probe.substr(last, next - last));
- last = next + 1;
- }
- fields.push_back(m_probe.substr(last));
-
+ std::vector<std::string> fields;
+ std::string delimiter = ":";
+ size_t last = 0;
+ size_t next = 0;
+ while ((next = m_probe.find(delimiter, last)) != std::string::npos) {
+ fields.push_back(m_probe.substr(last, next - last));
+ last = next + 1;
+ }
+ fields.push_back(m_probe.substr(last));
JsonSection root;
for (size_t i = 0; i < fields.size(); ++i) {
- root.put(fields.at(i), parameterJson.get(fields.at(i), ""));
+ root.put(fields.at(i), parameterJson.get(fields.at(i), ""));
}
root.put(JSON_CA_NAME, identifier.toUri());
diff --git a/src/client-module.cpp b/src/client-module.cpp
index b3af7dd..f8d73f6 100644
--- a/src/client-module.cpp
+++ b/src/client-module.cpp
@@ -111,6 +111,9 @@
if (nameUri != "") {
m_identityName = Name(nameUri);
}
+ else {
+ NDN_LOG_TRACE("The JSON_CA_NAME is empty.");
+ }
}
shared_ptr<Interest>
@@ -137,6 +140,7 @@
// do nothing
}
else {
+ NDN_LOG_TRACE("Randomly create a new name because m_identityName is empty and the param is empty.");
auto id = std::to_string(random::generateSecureWord64());
m_identityName = m_ca.m_caName;
m_identityName.append(id);