Skip to content

Commit

Permalink
Merge pull request #15430 from idryzhov/fix-ly-log
Browse files Browse the repository at this point in the history
lib: fix setting temporary log options for libyang
  • Loading branch information
donaldsharp authored Feb 26, 2024
2 parents 2bc8ae0 + 3cd6dda commit 8951d0e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/northbound.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,14 @@ void nb_nodes_delete(void)
struct nb_node *nb_node_find(const char *path)
{
const struct lysc_node *snode;
uint32_t llopts;
uint32_t llopts = 0;

/*
* Use libyang to find the schema node associated to the path and get
* the northbound node from there (snode private pointer). We need to
* disable logging temporarily to avoid libyang from logging an error
* message when the node is not found.
*/
llopts = ly_log_options(LY_LOSTORE);
llopts &= ~LY_LOLOG;
ly_temp_log_options(&llopts);

snode = yang_find_snode(ly_native_ctx, path, 0);
Expand Down

0 comments on commit 8951d0e

Please sign in to comment.