mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-20 17:52:46 +00:00
Fix bad JSON in response.
This commit is contained in:
parent
5515909c1e
commit
712e2785f2
@ -1638,7 +1638,7 @@ unsigned int SqliteNetworkController::_doCPGet(
|
||||
sqlite3_reset(_sGetConfig);
|
||||
sqlite3_bind_text(_sGetConfig,1,"instanceId",10,SQLITE_STATIC);
|
||||
if (sqlite3_step(_sGetConfig) == SQLITE_ROW) {
|
||||
Utils::snprintf(json,sizeof(json),"{\n\t\"controller\": true,\n\t\"apiVersion\": %d,\n\t\"clock\": %llu\n\t\"instanceId\": \"%s\"\n}",ZT_NETCONF_CONTROLLER_API_VERSION,(unsigned long long)OSUtils::now(),(const char *)sqlite3_column_text(_sGetConfig,0));
|
||||
Utils::snprintf(json,sizeof(json),"{\n\t\"controller\": true,\n\t\"apiVersion\": %d,\n\t\"clock\": %llu,\n\t\"instanceId\": \"%s\"\n}\n",ZT_NETCONF_CONTROLLER_API_VERSION,(unsigned long long)OSUtils::now(),(const char *)sqlite3_column_text(_sGetConfig,0));
|
||||
responseBody = json;
|
||||
responseContentType = "applicaiton/json";
|
||||
return 200;
|
||||
|
Loading…
x
Reference in New Issue
Block a user