Initialize membership trees for the CHAT call routing fixture

This commit is contained in:
evgeny committed 2026-11-04 01:57:10 +01:00
1 parent 189c61c3de
commit c8bb3dcbc3
1 file changed
+4
+4
View File
@@ -262,6 +262,7 @@ static int scenario_chat_group(void) {
uint8_t signature[64];
if (sc_ed25519_sign(inst_c->my_ed25519_privkey, (const uint8_t*)channel, strlen(channel), signature) != SC_OK) return -1;
for (unsigned i = 0; i < 3; i++) {
if (member_sync_init(nodes[i])) { fail("CHAT: member synchronization initialization failed"); return -1; }
if (topo_node_sqlite_channel_put(nodes[i]->topo_sqlite_db, channel, "call paths", nid_c,
inst_c->my_keys.public_key, NULL, inst_c->my_ed25519_pubkey, NULL, signature)) return -1;
for (unsigned j = 0; j < 3; j++) if (test_member_seed(nodes[i], channel, nodes[j]->my_keys.public_key,
@@ -284,6 +285,9 @@ static void scenario_teardown(void) {
if (h_b) { conn_mgr_close(h_b); h_b = NULL; }
incoming_call = connection_call = call_next_hop = 0; call_connection_type = CONN_TYPE_NONE;
call_accepted = call_ended = call_connection_events = call_media_frames = 0;
if (scenario_group != TOPO_GROUP_UTUN) {
member_sync_destroy(inst_a); member_sync_destroy(inst_b); member_sync_destroy(inst_c);
}
if (inst_a) { inst_a->running = 0; utun_instance_destroy(inst_a); inst_a = NULL; }
if (inst_b) { inst_b->running = 0; utun_instance_destroy(inst_b); inst_b = NULL; }
if (inst_c) { inst_c->running = 0; utun_instance_destroy(inst_c); inst_c = NULL; }