summaryrefslogtreecommitdiffstats
path: root/mgmtd/mgmt_txn.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2023-11-08 15:18:27 +0100
committerGitHub <noreply@github.com>2023-11-08 15:18:27 +0100
commit85a80ba5aab3bb0fdffe6b17de8b5c09de66d985 (patch)
tree22be7e2e1b8ba2d4c4f436f40eccb11283337e14 /mgmtd/mgmt_txn.c
parentMerge pull request #14743 from idryzhov/mgmtd-local-validation (diff)
parentmgmt: delete candidate scratch buffer (diff)
downloadfrr-85a80ba5aab3bb0fdffe6b17de8b5c09de66d985.tar.xz
frr-85a80ba5aab3bb0fdffe6b17de8b5c09de66d985.zip
Merge pull request #14544 from idryzhov/mgmt-scratch-buffer
mgmt: delete candidate scratch buffer
Diffstat (limited to 'mgmtd/mgmt_txn.c')
-rw-r--r--mgmtd/mgmt_txn.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c
index c5bd73e74..52d24be77 100644
--- a/mgmtd/mgmt_txn.c
+++ b/mgmtd/mgmt_txn.c
@@ -1193,25 +1193,11 @@ static int mgmt_txn_prepare_config(struct mgmt_txn_ctx *txn)
goto mgmt_txn_prepare_config_done;
}
- /*
- * Check for diffs from scratch buffer. If found empty
- * get the diff from Candidate DS itself.
- */
- cfg_chgs = &nb_config->cfg_chgs;
- if (RB_EMPTY(nb_config_cbs, cfg_chgs)) {
- /*
- * This could be the case when the config is directly
- * loaded onto the candidate DS from a file. Get the
- * diff from a full comparison of the candidate and
- * running DSs.
- */
- nb_config_diff(mgmt_ds_get_nb_config(
- txn->commit_cfg_req->req.commit_cfg
- .dst_ds_ctx),
- nb_config, &changes);
- cfg_chgs = &changes;
- del_cfg_chgs = true;
- }
+ nb_config_diff(mgmt_ds_get_nb_config(txn->commit_cfg_req->req.commit_cfg
+ .dst_ds_ctx),
+ nb_config, &changes);
+ cfg_chgs = &changes;
+ del_cfg_chgs = true;
if (RB_EMPTY(nb_config_cbs, cfg_chgs)) {
/*