dm: прямой обмен сообщениями (DM) + soundtouch + архитектура звонков
- src/dm/: dm_core/dm_crypto/dm_mailbox — прямой обмен сообщениями (DM) - lib/soundtouch-master/: vendored SoundTouch (изменение темпа/высоты аудио) - doc/dm_arch.md, doc/chat_call_arch.md: архитектура DM и звонков - tests: test_dm.c, test_dm_e2e.c - chat: рефакторинг chat_* модулей, member_sync, invite_build - chatgui/chatgui-android: синхронизация с новым API чата - lib/u_async, debug_config, utun_instance: сопутствующие изменения
This commit is contained in:
1 parent
761f64cf76
commit
73fe99b33f
123 files changed
+14095
-1270
No files matched your search
@@ -184,8 +184,10 @@ static struct ETCP_CONN* router_send_conn(struct ETCP_ROUTER_CONN* rconn) {
|
||||
if (c) return c;
|
||||
}
|
||||
}
|
||||
return topo_group_find_conn_for_node(group, rconn->remote_node_id);
|
||||
}
|
||||
return topo_group_find_conn_for_node(group, rconn->remote_node_id);
|
||||
/* group_id=0 (или группа не найдена) — глобальная маршрутизация: прямое соединение по node_id */
|
||||
return instance_find_conn(inst, rconn->remote_node_id);
|
||||
}
|
||||
|
||||
// Собрать и закодировать (подпись/шифрование) пакет в начале отправки.
|
||||
|
||||
@@ -555,7 +555,7 @@ struct TOPO_GROUP* topo_groups_create_group(struct TOPO_GROUPS* g, uint64_t grou
|
||||
}
|
||||
|
||||
DEBUG_INFO(DEBUG_CATEGORY_BGP, "Group created: group_id=%016llx type=%u ch_id=%s", (unsigned long long)group_id, group_type, group->channel_id);
|
||||
if (group_type == TOPO_GROUP_TYPE_CHAT && chat_setting_get_int("group_autoconnect", 1)) topo_group_connect_init(group);
|
||||
if (group_type == TOPO_GROUP_TYPE_CHAT && chat_setting_get_int(group->instance, "group_autoconnect", 1)) topo_group_connect_init(group);
|
||||
return group;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ static void tgc_notify_connecting(struct TOPO_GROUP_CONNECT* gc, const uint64_t*
|
||||
*p++ = (uint8_t)cl; memcpy(p, gc->group->channel_id, cl); p += cl;
|
||||
uint16_t c = (uint16_t)count; memcpy(p, &c, 2); p += 2;
|
||||
for (int i = 0; i < count; i++) { memcpy(p, &ids[i], 8); p += 8; }
|
||||
chat_event_post(CHAT_EVT_CONNECTING_NODES, buf, (int)sz);
|
||||
chat_event_post(gc->group->instance, CHAT_EVT_CONNECTING_NODES, buf, (int)sz);
|
||||
u_free(buf);
|
||||
DEBUG_INFO(DEBUG_CATEGORY_BGP, "%s: notify_connecting ch=%s count=%d",
|
||||
TGC_ID, gc->group->channel_id, count);
|
||||
|
||||
@@ -180,7 +180,7 @@ static void tgi_handle_info_req(struct ETCP_CONN* conn, const uint8_t* data, siz
|
||||
}
|
||||
|
||||
/* ── создаём инфраструктуру группы СРАЗУ ── */
|
||||
chat_core_ensure_channel_ready(ch_id);
|
||||
chat_core_ensure_channel_ready(inst, ch_id);
|
||||
|
||||
/* запуск BGP: узел соединён с группой, членство подтверждено (inviter, INFO_REQ) */
|
||||
{
|
||||
@@ -310,11 +310,11 @@ static void tgi_handle_info_resp(struct ETCP_CONN* conn, const uint8_t* data, si
|
||||
if (ldb) topo_node_sqlite_channel_put(ldb, ch_id, ch_name, ch_owner,
|
||||
ch_x25519, NULL, ch_ed_pub, NULL, ch_sig);
|
||||
}
|
||||
chat_core_ensure_channel_ready(ch_id);
|
||||
chat_core_ensure_channel_ready(inv->inst, ch_id);
|
||||
|
||||
{ uint8_t evt[65]; uint8_t ch_id_len = (uint8_t)strlen(ch_id);
|
||||
evt[0] = ch_id_len; memcpy(evt + 1, ch_id, ch_id_len);
|
||||
chat_event_post(CHAT_EVT_CHANNEL_UPDATED, evt, 1 + ch_id_len); }
|
||||
chat_event_post(inv->inst, CHAT_EVT_CHANNEL_UPDATED, evt, 1 + ch_id_len); }
|
||||
|
||||
/* ── верифицируем update_sig приглашающего ── */
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user