fix: auto_socket TCP hang + missing debug config apply in utun_instance_create_from_config
auto_socket.c: remove tsrv from inst->stcp_servers before stcp_link_server_destroy when TCP socket has null addr — freed pointer stayed in linked list corrupting it on next stcp_server_listen->stcp_server_list_add, causing hang utun_instance.c: apply debug_level + per-category debug from config in utun_instance_create_from_config (was only in utun_instance_create) chat_core.c: verbose error log on invalid args
This commit is contained in:
1 parent
ec9edb6a7c
commit
de61a2dacc
3 files changed
+414
-68
No files matched your search
@@ -88,7 +88,7 @@ void si_register(struct DB_SYNC_INSTANCE* si, const char* ch_id) {
|
||||
/* ─── жизненный цикл ─── */
|
||||
|
||||
int chat_core_init(struct UTUN_INSTANCE* inst, const char* db_path) {
|
||||
if (!inst || !db_path) return -1;
|
||||
if (!inst || !db_path) { DEBUG_ERROR(DEBUG_CATEGORY_CHAT_SYNC, "%s: invalid args inst=%p db_path=%p", CC_ID, (void*)inst, (void*)db_path); return -1; }
|
||||
memset(&g_cc, 0, sizeof(g_cc));
|
||||
snprintf(g_cc.db_path, sizeof(g_cc.db_path), "%s", db_path);
|
||||
|
||||
|
||||
Reference in new issue
Block a user