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
@@ -223,8 +223,12 @@ void SettingsDialog::onSave() {
|
||||
|
||||
/* update name in uTun if changed */
|
||||
if (nameChanged) {
|
||||
char* name_copy = u_strdup(newName.toUtf8().constData());
|
||||
if (name_copy) gui_bridge_post_uasync_fn(chat_core_update_my_name_trampoline, name_copy);
|
||||
struct update_my_name_arg* arg = (struct update_my_name_arg*)u_calloc(1, sizeof(*arg));
|
||||
if (arg) {
|
||||
arg->inst = gui_bridge_get_inst();
|
||||
snprintf(arg->name, sizeof(arg->name), "%s", newName.toUtf8().constData());
|
||||
gui_bridge_post_uasync_fn(chat_core_update_my_name_trampoline, arg);
|
||||
}
|
||||
m_oldNickname = newName;
|
||||
}
|
||||
|
||||
@@ -273,9 +277,11 @@ void SettingsDialog::onSave() {
|
||||
size_t klen = strlen(key), vlen = (size_t)val.size();
|
||||
size_t total = klen + 1 + vlen + 1;
|
||||
if (total <= 256) {
|
||||
void* arg = u_malloc(total);
|
||||
memcpy(arg, key, klen + 1);
|
||||
memcpy((char*)arg + klen + 1, val.constData(), vlen + 1);
|
||||
struct save_ui_state_arg* arg = (struct save_ui_state_arg*)u_malloc(sizeof(struct save_ui_state_arg));
|
||||
if (!arg) return;
|
||||
arg->inst = gui_bridge_get_inst();
|
||||
memcpy(arg->data, key, klen + 1);
|
||||
memcpy(arg->data + klen + 1, val.constData(), vlen + 1);
|
||||
gui_bridge_post_uasync_fn(chat_core_save_ui_state_trampoline, arg);
|
||||
}
|
||||
}
|
||||
@@ -291,9 +297,11 @@ void SettingsDialog::onSave() {
|
||||
QByteArray val = QByteArray::number(v);
|
||||
size_t klen = strlen(key), vl = (size_t)val.size(), total = klen + 1 + vl + 1;
|
||||
if (total <= 256) {
|
||||
void* arg = u_malloc(total);
|
||||
memcpy(arg, key, klen + 1);
|
||||
memcpy((char*)arg + klen + 1, val.constData(), vl + 1);
|
||||
struct save_ui_state_arg* arg = (struct save_ui_state_arg*)u_malloc(sizeof(struct save_ui_state_arg));
|
||||
if (!arg) return;
|
||||
arg->inst = gui_bridge_get_inst();
|
||||
memcpy(arg->data, key, klen + 1);
|
||||
memcpy(arg->data + klen + 1, val.constData(), vl + 1);
|
||||
gui_bridge_post_uasync_fn(chat_core_save_ui_state_trampoline, arg);
|
||||
}
|
||||
if (!m_configPath.isEmpty()) {
|
||||
@@ -308,9 +316,11 @@ void SettingsDialog::onSave() {
|
||||
QByteArray val = QByteArray::number(v);
|
||||
size_t klen = strlen(key), vl = (size_t)val.size(), total = klen + 1 + vl + 1;
|
||||
if (total <= 256) {
|
||||
void* arg = u_malloc(total);
|
||||
memcpy(arg, key, klen + 1);
|
||||
memcpy((char*)arg + klen + 1, val.constData(), vl + 1);
|
||||
struct save_ui_state_arg* arg = (struct save_ui_state_arg*)u_malloc(sizeof(struct save_ui_state_arg));
|
||||
if (!arg) return;
|
||||
arg->inst = gui_bridge_get_inst();
|
||||
memcpy(arg->data, key, klen + 1);
|
||||
memcpy(arg->data + klen + 1, val.constData(), vl + 1);
|
||||
gui_bridge_post_uasync_fn(chat_core_save_ui_state_trampoline, arg);
|
||||
}
|
||||
if (!m_configPath.isEmpty()) {
|
||||
|
||||
Reference in new issue
Block a user