Add signed device groups and compact NODEINFO packing
This commit is contained in:
1 parent
ef34f81c90
commit
d7006aecb5
52 files changed
+1979
-94
No files matched your search
@@ -392,6 +392,8 @@ int topo_node_sqlite_init(sqlite3* db) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (devgroup_schema(db)) return -1;
|
||||
|
||||
/* Старые подписи непригодны; адреса и максимальные версии остаются для bootstrap и новой публикации. */
|
||||
if (legacy_profile) {
|
||||
const char *migration = "SAVEPOINT compact_nat_profile;"
|
||||
@@ -1319,7 +1321,9 @@ int topo_node_sqlite_snapshot_put(sqlite3* db, struct TOPO_NODE* ni) {
|
||||
if (rc == SQLITE_OK) rc = sqlite3_bind_int64(stmt, 2, (sqlite3_int64)ni->timestamp);
|
||||
if (rc == SQLITE_OK) rc = sqlite3_bind_blob(stmt, 3, record, len, SQLITE_STATIC);
|
||||
if (rc == SQLITE_OK) rc = sqlite3_step(stmt);
|
||||
int changed = rc == SQLITE_DONE ? sqlite3_changes(db) : 0;
|
||||
int final = sqlite3_finalize(stmt);
|
||||
if (rc == SQLITE_DONE && final == SQLITE_OK && changed && devgroup_project(db, ni)) rc = SQLITE_ERROR;
|
||||
if (rc == SQLITE_DONE && final == SQLITE_OK) {
|
||||
rc = sqlite3_exec(db, "RELEASE node_snapshot", NULL, NULL, NULL);
|
||||
if (rc == SQLITE_OK) return 0;
|
||||
|
||||
Reference in new issue
Block a user