media_delivery: маршрутизация всегда через CHAT-группу

media_download/медиа-ответы и суперузловая репликация теперь берут группу
из контекста (dl->group_id, group_id из пакета, peer->group_id) вместо
хардкода TOPO_GROUP_UTUN. node_props_changed получает channel_id.
SUPER_HELLO несёт group_id.
This commit is contained in:
evgeny committed 2026-09-03 23:24:50 +03:00
1 parent 55da8fd146
commit 326dfd7e2c
10 files changed
+71 -86

No files matched your search

+4 -4
View File
@@ -230,9 +230,9 @@ static int _member_get_items(void* ctx, const char* ns, uint8_t level,
struct ms_props_cbk { node_props_changed_fn fn; void* arg; struct ms_props_cbk* next; };
static struct ms_props_cbk* g_props_cbks = NULL;
static void _fire_props_changed(uint64_t node_id, const char* adm_tags) {
static void _fire_props_changed(uint64_t node_id, const char* adm_tags, const char* channel_id) {
struct ms_props_cbk* pc = g_props_cbks;
while (pc) { pc->fn(node_id, adm_tags, pc->arg); pc = pc->next; }
while (pc) { pc->fn(node_id, adm_tags, channel_id, pc->arg); pc = pc->next; }
}
void member_sync_add_props_cbk(node_props_changed_fn fn, void* arg) {
@@ -283,7 +283,7 @@ static void _ms_on_bgp_node(struct TOPO_GROUP* group, uint64_t node_id, int even
DEBUG_DEBUG(DEBUG_CATEGORY_MEMBER_SYNC, "%s: bgp_node ev=%d nid=0x%016llx tags=%s",
MS_ID, event, (unsigned long long)node_id, tags);
_fire_props_changed(node_id, tags[0] ? tags : NULL);
_fire_props_changed(node_id, tags[0] ? tags : NULL, group->channel_id);
}
static int _sig_is_zero64(const uint8_t* sig) {
@@ -689,7 +689,7 @@ static int _member_apply_items(void* ctx, const char* ns, uint64_t from_peer,
struct ms_props_cbk* pc = g_props_cbks;
if (pc) {
const char* tags_final = atags[0] ? atags : NULL;
while (pc) { pc->fn(nid, tags_final, pc->arg); pc = pc->next; }
while (pc) { pc->fn(nid, tags_final, ns, pc->arg); pc = pc->next; }
}
}
if (r & MS_APPLY_STALE) {