Skip to content

Commit

Permalink
Merge pull request #15294 from okda-networks/sysrepo_set_sess_err
Browse files Browse the repository at this point in the history
lib: set change errmsg in sysrepo session
  • Loading branch information
donaldsharp authored Feb 5, 2024
2 parents cac925f + cfe1b5b commit 87b69cd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/northbound_sysrepo.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,12 @@ static int frr_sr_config_change_cb_prepare(sr_session_ctx_t *session,
ret = nb_candidate_commit_prepare(context, candidate, NULL,
&transaction, false, false, errmsg,
sizeof(errmsg));
if (ret != NB_OK && ret != NB_ERR_NO_CHANGES)
flog_warn(
EC_LIB_LIBSYSREPO,
"%s: failed to prepare configuration transaction: %s (%s)",
__func__, nb_err_name(ret), errmsg);
if (ret != NB_OK && ret != NB_ERR_NO_CHANGES) {
flog_warn(EC_LIB_LIBSYSREPO,
"%s: failed to prepare configuration transaction: %s (%s)",
__func__, nb_err_name(ret), errmsg);
sr_session_set_error_message(session, errmsg);
}

if (!transaction)
nb_config_free(candidate);
Expand Down

0 comments on commit 87b69cd

Please sign in to comment.