Fix failure status bug: when status is failure, request should be stopped
Change-Id: I699d9ae6bdc34ac67d9a8b3c69e9d789f9709c6d
diff --git a/src/client-module.cpp b/src/client-module.cpp
index 157f28d..b0f9825 100644
--- a/src/client-module.cpp
+++ b/src/client-module.cpp
@@ -21,6 +21,7 @@
#include "client-module.hpp"
#include "logging.hpp"
#include "json-helper.hpp"
+#include "challenge-module.hpp"
#include <ndn-cxx/security/signing-helpers.hpp>
#include <ndn-cxx/security/verification-helpers.hpp>
@@ -391,8 +392,8 @@
ClientModule::checkStatus(const RequestState& state, const JsonSection& json,
const ErrorCallback& errorCallback)
{
- if (state.m_status == "error") {
- errorCallback(json.get(JSON_ERROR_INFO, ""));
+ if (state.m_status == ChallengeModule::FAILURE) {
+ errorCallback(json.get(JSON_FAILURE_INFO, ""));
return false;
}
if (state.m_requestId.empty() || state.m_status.empty()) {