From f3fb1c64ac47940664564a7d9abe02a7442a4cd2 Mon Sep 17 00:00:00 2001 From: evgeny Date: Tue, 3 Nov 2026 16:36:38 +0100 Subject: [PATCH] Include admission in minimal media replication schemas --- tests/test_media_delivery_sql.c | 4 ++-- tests/test_media_replication.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_media_delivery_sql.c b/tests/test_media_delivery_sql.c index f5ceba5c8..b17574252 100644 --- a/tests/test_media_delivery_sql.c +++ b/tests/test_media_delivery_sql.c @@ -80,8 +80,8 @@ static void add_announcement_group(struct UTUN_INSTANCE* inst, uint64_t id) { snprintf(g->channel_id, sizeof(g->channel_id), "%llu", (unsigned long long)id); queue_data_put_with_index(inst->topo_groups->group_list, e); char command[512]; - snprintf(command, sizeof(command), "CREATE TABLE peers_%s(node_id INTEGER PRIMARY KEY,adm_tags TEXT);" - "INSERT INTO peers_%s VALUES(256,'{}'),(512,'{\"supernode\":\"yes\"}')", g->channel_id, g->channel_id); + snprintf(command, sizeof(command), "CREATE TABLE peers_%s(node_id INTEGER PRIMARY KEY,adm_tags TEXT,admitted INTEGER DEFAULT 1);" + "INSERT INTO peers_%s(node_id,adm_tags) VALUES(256,'{}'),(512,'{\"supernode\":\"yes\"}')", g->channel_id, g->channel_id); sql(inst->topo_sqlite_db, command); } diff --git a/tests/test_media_replication.c b/tests/test_media_replication.c index 8baa51386..8ad87b66d 100644 --- a/tests/test_media_replication.c +++ b/tests/test_media_replication.c @@ -69,8 +69,8 @@ static void add_group(struct UTUN_INSTANCE* inst, uint64_t group) { snprintf(g->channel_id, sizeof(g->channel_id), "%llu", (unsigned long long)group); queue_data_put_with_index(inst->topo_groups->group_list, e); char command[512]; - snprintf(command, sizeof(command), "CREATE TABLE peers_%llu(node_id INTEGER PRIMARY KEY,adm_tags TEXT);" - "INSERT INTO peers_%llu VALUES(256,'{\"supernode\":\"yes\"}'),(512,'{\"supernode\":\"yes\"}'),(768,'{\"supernode\":\"yes\"}')", + snprintf(command, sizeof(command), "CREATE TABLE peers_%llu(node_id INTEGER PRIMARY KEY,adm_tags TEXT,admitted INTEGER DEFAULT 1);" + "INSERT INTO peers_%llu(node_id,adm_tags) VALUES(256,'{\"supernode\":\"yes\"}'),(512,'{\"supernode\":\"yes\"}'),(768,'{\"supernode\":\"yes\"}')", (unsigned long long)group, (unsigned long long)group); sql(inst->md.db, command); }