fix: dialog hangs on join success + remove per-packet spam logs
- chat_sync.c: move pending_invite clear from INFO_RESP to WELCOME, post GUI_EVT_CONNECT_RESULT on invite success in cs_handle_welcome - etcp_connections.c: NORM_DECRYPT_TRY/CRYPTO_DECRYPT_OK DEBUG_DEBUG->TRACE - secure_channel.c: ENCRYPT/DECRYPT DEBUG_DEBUG->TRACE
This commit is contained in:
1 parent
4f831703f0
commit
3e95cf5ca6
5 files changed
+21
-6
No files matched your search
@@ -988,8 +988,6 @@ static void cs_handle_channel_info_resp(struct chat_sync* cs, uint64_t peer,
|
||||
cs_send(cs, ch_id, peer, jbuf, joff);
|
||||
cs->join_timer = uasync_set_timeout(cs->inst->ua,
|
||||
CS_JOIN_TIMEOUT_MS * 10, cs, cs_join_timeout_cb, "cs_join");
|
||||
cs->pending_invite_node_id = 0;
|
||||
cs->pending_invite_ch_id = 0;
|
||||
}
|
||||
|
||||
/* ─── CHANNEL_JOIN (0x0B): joiner → inviter ─── */
|
||||
@@ -1249,6 +1247,15 @@ static void cs_handle_welcome(struct chat_sync* cs, uint64_t peer,
|
||||
|
||||
DEBUG_INFO(DEBUG_CATEGORY_DB_SYNC, "%s: WELCOME processed ch=%s peers=%d — message sync triggered via db_sync (active conn or peer_check timer every 5s)",
|
||||
CS_ID, ch_id, pc);
|
||||
|
||||
if (cs->pending_invite_ch_id != 0) {
|
||||
uint64_t ch_id_num = strtoull(ch_id, NULL, 10);
|
||||
uint8_t cevt[20]; memcpy(cevt, &peer, 8); int r = 0; memcpy(cevt + 8, &r, 4); memcpy(cevt + 12, &ch_id_num, 8);
|
||||
gui_bridge_post(GUI_EVT_CONNECT_RESULT, cevt, 20);
|
||||
DEBUG_INFO(DEBUG_CATEGORY_DB_SYNC, "%s: WELCOME invite success ch=%s peer=%016llx — posted GUI_EVT_CONNECT_RESULT",
|
||||
CS_ID, ch_id, (unsigned long long)peer);
|
||||
cs->pending_invite_node_id = 0; cs->pending_invite_ch_id = 0; if (cs->join_timer) { uasync_cancel_timeout(cs->inst->ua, cs->join_timer); cs->join_timer = NULL; }
|
||||
}
|
||||
}
|
||||
|
||||
/* ─── PEER_UPSERT (0x0D): propagate new peer ─── */
|
||||
|
||||
Reference in new issue
Block a user