Сохрани накопленные исправления аудио, async и диагностики
This commit is contained in:
1 parent
b1e3193899
commit
bdcf8b5634
59 files changed
+4611
-1441
No files matched your search
@@ -276,9 +276,8 @@ static void* instance_thread(void* arg) {
|
||||
if (!g_ua) { IL_LOGE("uasync_create failed"); free_config(config); __atomic_store_n(&g_thread_running, 0, __ATOMIC_RELEASE); pthread_detach(pthread_self()); return NULL; }
|
||||
standby_init(g_ua);
|
||||
|
||||
if (config->global.log_udp_ip[0] && config->global.log_udp_port > 0) {
|
||||
udp_log_set_target(config->global.log_udp_ip, config->global.log_udp_port);
|
||||
}
|
||||
udp_log_set_target(config->global.log_udp_ip, config->global.log_udp_port);
|
||||
udp_log_attach(g_ua);
|
||||
|
||||
IL_LOGI("[EVT_DIAG] thread: about to set chat_event handler, g_event_handler=%p", (void*)g_event_handler);
|
||||
ensure_keys(config);
|
||||
@@ -288,6 +287,7 @@ static void* instance_thread(void* arg) {
|
||||
if (!g_inst) {
|
||||
IL_LOGE("utun_instance_create_from_config failed");
|
||||
standby_deinit();
|
||||
udp_log_detach(g_ua);
|
||||
uasync_destroy(g_ua, 0);
|
||||
g_ua = NULL;
|
||||
u_report_unfreed_blocks();
|
||||
@@ -305,6 +305,7 @@ static void* instance_thread(void* arg) {
|
||||
utun_instance_destroy(g_inst);
|
||||
g_inst = NULL;
|
||||
standby_deinit();
|
||||
udp_log_detach(g_ua);
|
||||
uasync_destroy(g_ua, 0);
|
||||
g_ua = NULL;
|
||||
u_report_unfreed_blocks();
|
||||
@@ -362,6 +363,7 @@ static void* instance_thread(void* arg) {
|
||||
uasync_print_resources(g_ua, "AFTER_DESTROY");
|
||||
u_report_unfreed_blocks();
|
||||
standby_deinit();
|
||||
udp_log_detach(g_ua);
|
||||
uasync_destroy(g_ua, 0);
|
||||
my_ua = NULL;
|
||||
g_ua = uasync_create();
|
||||
@@ -378,6 +380,8 @@ static void* instance_thread(void* arg) {
|
||||
u_free(cfg);
|
||||
if (!config) { IL_LOGE("poll exit: parse_config failed"); break; }
|
||||
config->global.client_type = CLIENT_TYPE_MOBILE; /* Android — всегда мобильный узел */
|
||||
udp_log_set_target(config->global.log_udp_ip, config->global.log_udp_port);
|
||||
udp_log_attach(g_ua);
|
||||
|
||||
g_inst = utun_instance_create_from_config(g_ua, config);
|
||||
my_inst = g_inst;
|
||||
@@ -414,6 +418,7 @@ static void* instance_thread(void* arg) {
|
||||
}
|
||||
if (my_ua) {
|
||||
standby_deinit();
|
||||
udp_log_detach(my_ua);
|
||||
uasync_destroy(my_ua, 0);
|
||||
g_ua = NULL;
|
||||
my_ua = NULL;
|
||||
@@ -428,7 +433,7 @@ static void* instance_thread(void* arg) {
|
||||
IL_LOGI("cleanup (stale thread gen=%d vs %d): destroying own inst=%p ua=%p to avoid fd leak",
|
||||
my_gen, g_generation, (void*)my_inst, (void*)my_ua);
|
||||
if (my_inst) { utun_instance_destroy(my_inst); my_inst = NULL; }
|
||||
if (my_ua) { uasync_destroy(my_ua, 0); my_ua = NULL; }
|
||||
if (my_ua) { udp_log_detach(my_ua); uasync_destroy(my_ua, 0); my_ua = NULL; }
|
||||
}
|
||||
__atomic_store_n(&g_thread_running, 0, __ATOMIC_RELEASE);
|
||||
pthread_mutex_lock(&g_stop_mutex);
|
||||
|
||||
Reference in new issue
Block a user