Skip to content
Snippets Groups Projects
Commit 747a6368 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

namedirectory: don't parse request in case of failure

Change-Id: I6f210246551b13aad13fc4c543a733a7ab5d2abd
parent 50907ce6
No related branches found
No related tags found
No related merge requests found
...@@ -165,7 +165,7 @@ NameDirectory::lookupAddress(const std::string& addr, LookupCallback cb) ...@@ -165,7 +165,7 @@ NameDirectory::lookupAddress(const std::string& addr, LookupCallback cb)
addr.c_str(), addr.c_str(),
response.status_code); response.status_code);
cb("", Response::error); cb("", Response::error);
} } else {
try { try {
Json::Value json; Json::Value json;
std::string err; std::string err;
...@@ -198,6 +198,7 @@ NameDirectory::lookupAddress(const std::string& addr, LookupCallback cb) ...@@ -198,6 +198,7 @@ NameDirectory::lookupAddress(const std::string& addr, LookupCallback cb)
JAMI_ERR("Error when performing address lookup: %s", e.what()); JAMI_ERR("Error when performing address lookup: %s", e.what());
cb("", Response::error); cb("", Response::error);
} }
}
requests_.erase(reqid); requests_.erase(reqid);
}); });
request->send(); request->send();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment