about config tree API

Hi,
I can get the cpuShare parameter of my application hello2 by typing the following in the console:

root@swi-mdm9x15:/legato/systems/current# config get /apps/hello2/cpuShare
1024

However, I cannot get it inside the application code.
I have added the following in the adef file:
requires:
{
configTree:
{
[rw] .

}
}

[code]#include “legato.h”
#include “interfaces.h”

COMPONENT_INIT
{
LE_INFO(“Hello, world.2”);

le_cfg_IteratorRef_t iteratorRef = le_cfg_CreateReadTxn("/apps/hello2/cpuShare");



LE_INFO("is it empty? %d", le_cfg_IsEmpty(iteratorRef,""));
LE_INFO("is node exists? %d", le_cfg_NodeExists(iteratorRef,""));



int32_t myCPUVal = le_cfg_GetInt(iteratorRef, "", 1);

LE_INFO(“myCPUVal=%d”,myCPUVal);

le_cfg_CancelTxn(iteratorRef);

}
[/code]

But it says the path is empth and the node is not exists.
Any idea?

Hi,

I found that once I put the application to unsandboxed in adef file:
sandboxed: false

The code is working fine.
Any idea how can it be working under sandboxed condition?

BR,
Jack