tree data UPDATE always log invalid value schema
@@ -472,9 +472,18 @@ lys_value_validate(const struct ly_ctx *ctx, const struct lysc_node *node, const
} else if (rc && err) {
if (ctx) {
/* log only in case the ctx was provided as input parameter */
+ if (err->path) {
LOG_LOCSET(NULL, NULL, err->path, NULL);
+ } else {
+ /* use at least the schema path */
+ LOG_LOCSET(node, NULL, NULL, NULL);
+ }
LOGVAL_ERRITEM(ctx, err);
+ if (err->path) {
LOG_LOCBACK(0, 0, 1, 0);
+ } else {
+ LOG_LOCBACK(1, 0, 0, 0);
+ }
}
ly_err_free(err);
}
