diff options
| author | Christian Hopps <chopps@labn.net> | 2024-01-06 11:06:38 +0000 | 
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2024-01-07 15:17:56 +0000 | 
| commit | 1e4229fc1f843f88e9c9bc6ec4700489a455e6cf (patch) | |
| tree | fd0900c7b583456db1134205bd560712026558ed /mgmtd/mgmt_txn.c | |
| parent | cf67a7e26577b0dda276324b40a602ae084e504e (diff) | |
lib: use libyang functions if they are present
Add configure.ac tests for libyang functions, if not present supply the
functionality ourselves in yang.[ch]
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'mgmtd/mgmt_txn.c')
| -rw-r--r-- | mgmtd/mgmt_txn.c | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c index 1c64445631..297482f015 100644 --- a/mgmtd/mgmt_txn.c +++ b/mgmtd/mgmt_txn.c @@ -1278,8 +1278,9 @@ static int txn_get_tree_data_done(struct mgmt_txn_ctx *txn,  		/*  		 * We have a complex query so Filter results by the xpath query.  		 */ -		ret = yang_trim_tree(get_tree->client_results, -				     txn_req->req.get_tree->xpath); +		if (yang_lyd_trim_xpath(&get_tree->client_results, +					txn_req->req.get_tree->xpath)) +			ret = NB_ERR;  	}  	if (ret == NB_OK)  | 
