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:
evgeny committed 2026-08-07 18:31:30 +03:00
1 parent ec9edb6a7c
commit de61a2dacc
3 files changed
+414 -68

No files matched your search

+5
View File
@@ -368,6 +368,11 @@ struct UTUN_INSTANCE* utun_instance_create_from_config(struct UASYNC* ua, struct
return NULL;
}
if (config->global.debug_level[0])
debug_apply_global_level(config->global.debug_level);
for (int i = 0; i < config->global.debug_levels.count; i++)
debug_apply_category_config(config->global.debug_levels.category[i],
config->global.debug_levels.level[i]);
// Allocate instance
struct UTUN_INSTANCE *instance = u_calloc(1, sizeof(struct UTUN_INSTANCE));
if (!instance) {