privcand UPDATE add private candidate datastore support#1805
Open
Ardival wants to merge 1 commit intoCESNET:develfrom
Open
privcand UPDATE add private candidate datastore support#1805Ardival wants to merge 1 commit intoCESNET:develfrom
Ardival wants to merge 1 commit intoCESNET:develfrom
Conversation
Ardival
commented
Apr 30, 2026
- include corresponding tests
michalvasko
requested changes
May 4, 2026
- include corresponding tests
michalvasko
requested changes
May 6, 2026
|
|
||
| cleanup: | ||
| free(xpath); | ||
| if (r) { |
Member
There was a problem hiding this comment.
May be uninitialized (if conflist_set is NULL).
| } | ||
|
|
||
| /* add conflict node into error msg*/ | ||
| nc_err_add_info_other(err, err_info_node); |
Member
There was a problem hiding this comment.
Clearer and more readable code would be to move err_info_node = NULL; right after this line and also initializing err_info_node to NULL. Then lyd_free_tree(err_info_node) in the cleanup could be moved outside the r condition.
| int use_private_cand; /* flag to use private candidate instead of shared candidate */ | ||
| sr_priv_cand_t *private_ds; /* private candidate structure */ | ||
| sr_priv_cand_t *private_ds_backup; /* backup of private candidate */ | ||
| int privcand_lock; /* lock for private candidate */ |
Member
There was a problem hiding this comment.
Please, mention the purpose at least a but more clearly. Something like flag for tracking the lock state, changed by <lock> and <unlock> RPCs.
| goto cleanup; | ||
| } | ||
|
|
||
| if (sr_pc_validate(user_sess->sess, NULL, user_sess->private_ds)) { |
Member
There was a problem hiding this comment.
Should be called only for test-only, just like in the standard edit-config.
| * @param[in] conflict_set Set of conflicts. | ||
| * @return Server reply structure. | ||
| */ | ||
| struct nc_server_reply *np_reply_err_conflict(const struct lyd_node *rpc, sr_pc_conflict_set_t *conflict_set); |
Member
There was a problem hiding this comment.
conflict_set should now be const.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.