sysrepo CHANGE new message when not applying scheduled changes
@@ -160,8 +160,9 @@ sr_connect(const sr_conn_options_t opts, sr_conn_ctx_t **conn_p)
if ((err_info = sr_lydmods_parse(conn->ly_ctx, &sr_mods))) {
goto cleanup_unlock;
}
- if (created || (!(opts & SR_CONN_NO_SCHED_CHANGES) && !((sr_main_shm_t *)conn->main_shm.addr)->conn_state.conn_count)) {
+ if (created || !(opts & SR_CONN_NO_SCHED_CHANGES)) {
/* apply scheduled changes if we can */
+ if (!((sr_main_shm_t *)conn->main_shm.addr)->conn_state.conn_count) {
if ((err_info = sr_lydmods_sched_apply(sr_mods, conn->ly_ctx, &changed, &fail))) {
goto cleanup_unlock;
}
@@ -175,6 +176,10 @@ sr_connect(const sr_conn_options_t opts, sr_conn_ctx_t **conn_p)
} else {
ctx_updated = 1;
}
+ } else {
+ assert(!created);
+ SR_LOG_INFMSG("Scheduled changes not applied because of other existing connections.");
+ }
}
}
