data BUGFIX correct return code from lyd_value_compare()
@@ -220,7 +220,10 @@ lyd_value_compare(const struct lyd_node_term *node, const char *value, size_t va
}
/* compare data */
- ret = type->plugin->compare(&node->value, &data);
+ if (type->plugin->compare(&node->value, &data)) {
+ /* do not assign it directly from the compare callback to keep possible LY_EINCOMPLETE from validation */
+ ret = LY_EVALID;
+ }
cleanup:
type->plugin->free(ctx, type, &data);
