From 21f4b19cda76ce116349513379b5cca7063cd47c Mon Sep 17 00:00:00 2001 From: Amin Ben Romdhane Date: Wed, 22 Oct 2025 13:15:19 +0000 Subject: [PATCH] bbfdm methods are not working for objects exposed from parent object different to 'Device.' --- libbbfdm-api/legacy/dmbbf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libbbfdm-api/legacy/dmbbf.c b/libbbfdm-api/legacy/dmbbf.c index 2d9ce4c1..56c0e78a 100644 --- a/libbbfdm-api/legacy/dmbbf.c +++ b/libbbfdm-api/legacy/dmbbf.c @@ -448,8 +448,16 @@ static void dm_browse_entry(struct dmctx *dmctx, DMNODE *parent_node, DMOBJ *ent else dmasprintf(&(node.current_object), "%s%s.", parent_obj, entryobj->obj); - if (DM_STRCMP(parent_obj, ROOT_NODE) == 0) { + if (DM_STRCMP(parent_obj, ROOT_NODE) == 0) { // Case1: parent object is 'Device.' node.current_object_file = entryobj->obj; + } else if (parent_node->parent && DM_STRLEN(parent_node->parent->current_object) == 0) { // Case2: parent object is 'Device.X.X.' + size_t count = 0; + + char **parts = strsplit(parent_obj, ".", &count); + if (count < 2) + return; + + node.current_object_file = parts[1]; } if (dmctx->checkobj) {