From 3908de9fe05f878010aca4fb475de21a2895e408 Mon Sep 17 00:00:00 2001 From: Hu Yueh-Wei Date: Mon, 24 Feb 2025 00:21:19 +0800 Subject: [PATCH] fix: refine codes --- core/src/ten_runtime/app/msg_interface/common.c | 3 --- core/src/ten_runtime/extension/ten_env/on_xxx.c | 14 ++++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/core/src/ten_runtime/app/msg_interface/common.c b/core/src/ten_runtime/app/msg_interface/common.c index a7add5aae..f1f5a7318 100644 --- a/core/src/ten_runtime/app/msg_interface/common.c +++ b/core/src/ten_runtime/app/msg_interface/common.c @@ -124,9 +124,6 @@ static bool ten_app_handle_msg_default_handler(ten_app_t *self, ten_value_create_string("Graph not found."), NULL); ten_msg_clear_and_set_dest_from_msg_src(resp, msg); - ten_msg_dump(msg, NULL, "=-=-= 111 ^m"); - ten_msg_dump(resp, NULL, "=-=-= 222 ^m"); - if (connection) { // The following two functions are desired to be called in order -- // call 'ten_connection_migration_state_reset_when_engine_not_found()' diff --git a/core/src/ten_runtime/extension/ten_env/on_xxx.c b/core/src/ten_runtime/extension/ten_env/on_xxx.c index 4b85fee75..bd050df44 100644 --- a/core/src/ten_runtime/extension/ten_env/on_xxx.c +++ b/core/src/ten_runtime/extension/ten_env/on_xxx.c @@ -176,9 +176,10 @@ bool ten_extension_on_configure_done(ten_env_t *self) { TEN_ASSERT(rc, "Should not happen."); // Trigger the extension on_init flow. - ten_runloop_post_task_tail(ten_extension_get_attached_runloop(extension), - ten_extension_trigger_on_init_task, extension, - NULL); + // ten_runloop_post_task_tail(ten_extension_get_attached_runloop(extension), + // ten_extension_trigger_on_init_task, extension, + // NULL); + ten_extension_on_init(extension); ten_error_deinit(&err); @@ -263,9 +264,10 @@ bool ten_extension_on_init_done(ten_env_t *self) { ten_extension_flush_all_pending_msgs_received_in_init_stage(extension); // Trigger on_start of extension. - ten_runloop_post_task_tail(ten_extension_get_attached_runloop(extension), - ten_extension_trigger_on_start_task, extension, - NULL); + // ten_runloop_post_task_tail(ten_extension_get_attached_runloop(extension), + // ten_extension_trigger_on_start_task, extension, + // NULL); + ten_extension_on_start(extension); return true; }