diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-08-19 08:15:24 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-19 08:15:24 -0400 |
| commit | b80a2cd3942a65f37b66dbf5fe7a1105a50e6bbc (patch) | |
| tree | 5196a8dd0e468198a616f5c93d0ea080ac97ab38 /lib/northbound_sysrepo.c | |
| parent | 4fe5bc8c6282b58cbd9206146bb38e983f815de8 (diff) | |
| parent | 0fe5b904b76ee37ee0d6ad6230e1ea330694f2ea (diff) | |
Merge pull request #6920 from opensourcerouting/nb-errors-apply-phase
lib: don't ignore error messages generated during the commit apply phase
Diffstat (limited to 'lib/northbound_sysrepo.c')
| -rw-r--r-- | lib/northbound_sysrepo.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/northbound_sysrepo.c b/lib/northbound_sysrepo.c index 500203173c..2209b19c14 100644 --- a/lib/northbound_sysrepo.c +++ b/lib/northbound_sysrepo.c @@ -329,8 +329,10 @@ static int frr_sr_config_change_cb_apply(sr_session_ctx_t *session, /* Apply the transaction. */ if (transaction) { struct nb_config *candidate = transaction->config; + char errmsg[BUFSIZ] = {0}; - nb_candidate_commit_apply(transaction, true, NULL); + nb_candidate_commit_apply(transaction, true, NULL, errmsg, + sizeof(errmsg)); nb_config_free(candidate); } @@ -343,8 +345,9 @@ static int frr_sr_config_change_cb_abort(sr_session_ctx_t *session, /* Abort the transaction. */ if (transaction) { struct nb_config *candidate = transaction->config; + char errmsg[BUFSIZ] = {0}; - nb_candidate_commit_abort(transaction); + nb_candidate_commit_abort(transaction, errmsg, sizeof(errmsg)); nb_config_free(candidate); } |
