Skip to content

Commit ecad67e

Browse files
committed
fix: refine codes
1 parent 3135c62 commit ecad67e

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

core/src/ten_runtime/extension_thread/msg_interface/common.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,16 +254,23 @@ void ten_extension_thread_dispatch_msg(ten_extension_thread_t *self,
254254

255255
ten_app_push_to_in_msgs_queue(app, msg);
256256
} else {
257-
if (ten_string_is_empty(&dest_loc->extension_group_name)) {
257+
if (ten_string_is_empty(&dest_loc->extension_name)) {
258258
// Because the destination is the current engine, so ask the engine to
259259
// handle this message.
260260

261261
ten_engine_append_to_in_msgs_queue(engine, msg);
262-
} else { // =-=-=
263-
if (!ten_string_is_equal(&dest_loc->extension_group_name,
264-
&extension_group->name)) {
262+
} else {
263+
const char *extension_group_name =
264+
ten_extension_context_get_extension_group_name(
265+
self->extension_context,
266+
ten_string_get_raw_str(&dest_loc->app_uri),
267+
ten_string_get_raw_str(&dest_loc->graph_id),
268+
ten_string_get_raw_str(&dest_loc->extension_name));
269+
TEN_ASSERT(extension_group_name, "Should not happen.");
270+
271+
if (!ten_string_is_equal_c_str(&extension_group->name,
272+
extension_group_name)) {
265273
// Find the correct extension thread to handle this message.
266-
267274
ten_engine_append_to_in_msgs_queue(engine, msg);
268275
} else {
269276
// The message should be handled in the current extension thread, so

core/src/ten_rust/src/json_schema/data/property.schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@
206206
"additionalProperties": false,
207207
"required": [
208208
"type",
209-
"name"
209+
"name",
210+
"addon"
210211
],
211212
"properties": {
212213
"type": {

0 commit comments

Comments
 (0)