|
|
|
|
@ -706,10 +706,10 @@ static int member_apply_record(struct UTUN_INSTANCE* inst, const char* ch_id,
|
|
|
|
|
|
|
|
|
|
static void member_committed(struct UTUN_INSTANCE* inst, const char* ns, uint64_t node_id) { |
|
|
|
|
merkle_sync_changed(inst, ns); |
|
|
|
|
_fire_props_changed(inst, node_id, NULL, ns); |
|
|
|
|
struct TOPO_GROUP* g = inst->topo_groups ? topo_groups_find(inst->topo_groups, strtoull(ns, NULL, 10)) : NULL; |
|
|
|
|
struct ETCP_CONN* conn = instance_find_conn(inst, node_id); |
|
|
|
|
if (g && g->group_type == TOPO_GROUP_TYPE_CHAT) { |
|
|
|
|
_ms_on_bgp_node(g, node_id, 0, inst); |
|
|
|
|
/* Существующий UP сохраняем; новый транспорт выбирает только автопланировщик. */ |
|
|
|
|
if (conn && conn->links_up && !conn->close_requested && topo_group_new_conn(g, conn) < 0) |
|
|
|
|
DEBUG_WARN(DEBUG_CATEGORY_MEMBER_SYNC, "%s: cannot attach UP member channel=%s node=%016llx", MS_ID, ns, |
|
|
|
|
@ -980,7 +980,8 @@ static int _member_apply_items(void* ctx, const char* ns, uint64_t from_peer, co
|
|
|
|
|
if (member_decode(data + off, len - off, &w, &used) < 0) { rc = MT_ERR_DATA; break; } |
|
|
|
|
if (changed[i]) { |
|
|
|
|
member_committed(inst, ns, w.rec.node_id); |
|
|
|
|
_fire_props_changed(inst, w.rec.node_id, w.tags[0] ? w.tags : NULL, ns); |
|
|
|
|
if (!inst->topo_groups || !topo_groups_find(inst->topo_groups, strtoull(ns, NULL, 10))) |
|
|
|
|
_fire_props_changed(inst, w.rec.node_id, w.tags[0] ? w.tags : NULL, ns); |
|
|
|
|
_fire_apply_cbk(inst, ns, w.rec.node_id, w.rec.x25519, w.rec.signed_by, w.rec.signature); |
|
|
|
|
} |
|
|
|
|
off += used; |
|
|
|
|
|