summaryrefslogtreecommitdiff
path: root/controller
diff options
context:
space:
mode:
Diffstat (limited to 'controller')
-rw-r--r--controller/EmbeddedNetworkController.cpp3
-rw-r--r--controller/JSONDB.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/controller/EmbeddedNetworkController.cpp b/controller/EmbeddedNetworkController.cpp
index b7b740a0..0884deda 100644
--- a/controller/EmbeddedNetworkController.cpp
+++ b/controller/EmbeddedNetworkController.cpp
@@ -1129,7 +1129,8 @@ unsigned int EmbeddedNetworkController::handleControlPlaneHttpDELETE(
} else {
Mutex::Lock _l(_db_m);
- std::string pfx("network/"); pfx.append(nwids);
+ std::string pfx("network/");
+ pfx.append(nwids);
_db.filter(pfx,[](const std::string &n,const json &obj) {
return false; // delete
});
diff --git a/controller/JSONDB.cpp b/controller/JSONDB.cpp
index 8b6de9b4..756664eb 100644
--- a/controller/JSONDB.cpp
+++ b/controller/JSONDB.cpp
@@ -99,8 +99,9 @@ void JSONDB::erase(const std::string &n)
void JSONDB::_reload(const std::string &p,const std::string &b)
{
- std::vector<std::string> dl(OSUtils::listDirectory(p.c_str()));
+ std::vector<std::string> dl(OSUtils::listDirectory(p.c_str(),true));
for(std::vector<std::string>::const_iterator di(dl.begin());di!=dl.end();++di) {
+ printf("%s\n",di->c_str());
if ((di->length() > 5)&&(di->substr(di->length() - 5) == ".json")) {
this->get(b + di->substr(0,di->length() - 5));
} else {