mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
Fix bug in rules JSON output.
This commit is contained in:
parent
38d34a7495
commit
cac6be87ba
1 changed files with 1 additions and 0 deletions
|
@ -1560,6 +1560,7 @@ unsigned int SqliteNetworkController::_doCPGet(
|
||||||
bool firstRule = true;
|
bool firstRule = true;
|
||||||
while (sqlite3_step(_sListRules) == SQLITE_ROW) {
|
while (sqlite3_step(_sListRules) == SQLITE_ROW) {
|
||||||
responseBody.append(firstRule ? "\n\t{\n" : ",{\n");
|
responseBody.append(firstRule ? "\n\t{\n" : ",{\n");
|
||||||
|
firstRule = false;
|
||||||
Utils::snprintf(json,sizeof(json),"\t\t\"ruleNo\": %lld,\n",sqlite3_column_int64(_sListRules,0));
|
Utils::snprintf(json,sizeof(json),"\t\t\"ruleNo\": %lld,\n",sqlite3_column_int64(_sListRules,0));
|
||||||
responseBody.append(json);
|
responseBody.append(json);
|
||||||
if (sqlite3_column_type(_sListRules,1) != SQLITE_NULL) {
|
if (sqlite3_column_type(_sListRules,1) != SQLITE_NULL) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue