diff options
author | Kees Bos <k.bos@capitar.com> | 2015-06-15 10:29:12 +0200 |
---|---|---|
committer | Kees Bos <k.bos@capitar.com> | 2015-06-15 10:29:12 +0200 |
commit | 4affa10ca0bca91f9ec44d39860c8ede20daf9a2 (patch) | |
tree | 44742b4cc12e4741f07d8ec8eced06d1f67280af /controller | |
parent | 2e1d363a86f3c662b208cb10fe28880e2e373081 (diff) | |
download | infinitytier-4affa10ca0bca91f9ec44d39860c8ede20daf9a2.tar.gz infinitytier-4affa10ca0bca91f9ec44d39860c8ede20daf9a2.zip |
Fix 404 on creation of new network
Diffstat (limited to 'controller')
-rw-r--r-- | controller/SqliteNetworkController.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/controller/SqliteNetworkController.cpp b/controller/SqliteNetworkController.cpp index 9f91564a..50927722 100644 --- a/controller/SqliteNetworkController.cpp +++ b/controller/SqliteNetworkController.cpp @@ -747,6 +747,7 @@ unsigned int SqliteNetworkController::handleControlPlaneHttpPOST( } // else 404 } else { + std::vector<std::string> path_copy(path); if (!networkExists) { if (path[1].substr(10) == "______") { @@ -786,6 +787,7 @@ unsigned int SqliteNetworkController::handleControlPlaneHttpPOST( sqlite3_bind_int64(_sCreateNetwork,3,(long long)OSUtils::now()); if (sqlite3_step(_sCreateNetwork) != SQLITE_DONE) return 500; + path_copy[1].assign(nwids); } json_value *j = json_parse(body.c_str(),body.length()); @@ -1041,7 +1043,7 @@ unsigned int SqliteNetworkController::handleControlPlaneHttpPOST( sqlite3_bind_text(_sSetNetworkRevision,2,nwids,16,SQLITE_STATIC); sqlite3_step(_sSetNetworkRevision); - return _doCPGet(path,urlArgs,headers,body,responseBody,responseContentType); + return _doCPGet(path_copy,urlArgs,headers,body,responseBody,responseContentType); } } // else 404 |