diff options
author | Donald Sharp <donaldsharp72@gmail.com> | 2023-11-08 15:18:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-08 15:18:27 +0100 |
commit | 85a80ba5aab3bb0fdffe6b17de8b5c09de66d985 (patch) | |
tree | 22be7e2e1b8ba2d4c4f436f40eccb11283337e14 /mgmtd/mgmt_txn.c | |
parent | Merge pull request #14743 from idryzhov/mgmtd-local-validation (diff) | |
parent | mgmt: delete candidate scratch buffer (diff) | |
download | frr-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.c | 24 |
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)) { /* |