mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-03 03:36:41 +00:00
Fix 404 on creation of new network
This commit is contained in:
parent
2e1d363a86
commit
4affa10ca0
@ -747,6 +747,7 @@ unsigned int SqliteNetworkController::handleControlPlaneHttpPOST(
|
|||||||
} // else 404
|
} // else 404
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
std::vector<std::string> path_copy(path);
|
||||||
|
|
||||||
if (!networkExists) {
|
if (!networkExists) {
|
||||||
if (path[1].substr(10) == "______") {
|
if (path[1].substr(10) == "______") {
|
||||||
@ -786,6 +787,7 @@ unsigned int SqliteNetworkController::handleControlPlaneHttpPOST(
|
|||||||
sqlite3_bind_int64(_sCreateNetwork,3,(long long)OSUtils::now());
|
sqlite3_bind_int64(_sCreateNetwork,3,(long long)OSUtils::now());
|
||||||
if (sqlite3_step(_sCreateNetwork) != SQLITE_DONE)
|
if (sqlite3_step(_sCreateNetwork) != SQLITE_DONE)
|
||||||
return 500;
|
return 500;
|
||||||
|
path_copy[1].assign(nwids);
|
||||||
}
|
}
|
||||||
|
|
||||||
json_value *j = json_parse(body.c_str(),body.length());
|
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_bind_text(_sSetNetworkRevision,2,nwids,16,SQLITE_STATIC);
|
||||||
sqlite3_step(_sSetNetworkRevision);
|
sqlite3_step(_sSetNetworkRevision);
|
||||||
|
|
||||||
return _doCPGet(path,urlArgs,headers,body,responseBody,responseContentType);
|
return _doCPGet(path_copy,urlArgs,headers,body,responseBody,responseContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // else 404
|
} // else 404
|
||||||
|
Loading…
Reference in New Issue
Block a user