I’m having some issues with le_cfg_DeleteNode() not appearing to work correctly.
My intention is to completely replace a subtree when new data is received by the module (via AirVantage in this case, but that’s not the issue this time).
If I do the following:
iter = le_cfg_CreateWriteTxn("/v1/mydata"); le_cfg_DeleteNode(iter, ""); le_cfg_CommitTxn(iter);
then my subtree
/v1/mydata and all child nodes is deleted (as shown by using
config get myapp:/ in a console window
However, if I delete the node and then write new data into the tree like so:
iter = le_cfg_CreateWriteTxn("/v1/mydata"); le_cfg_DeleteNode(iter, ""); le_cfg_SetInt(iter, "/v1/mydata/myIntB", 5); le_cfg_CommitTxn(iter);
Then old data (such as
/v1/mydata/myIntA) from previous instance of the config tree is still present, even after the delete().
Does there need to be a time delay after the delete() before I start writing to the tree again? If so, this is not documented in the on-line docs.
Can anyone enlighten me why this is happening?