sysrepo BUGFIX always parse module data
Fixes
@@ -155,11 +155,13 @@ sr_connect(const sr_conn_options_t opts, sr_conn_ctx_t **conn_p)
goto cleanup_unlock;
}
changed = 1;
- } else if (created || (!(opts & SR_CONN_NO_SCHED_CHANGES) && !((sr_main_shm_t *)conn->main_shm.addr)->conn_state.conn_count)) {
- /* if there are no connections, parse internal data and apply scheduled changes */
+ } else {
+ /* parse sysrepo module data */
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)) {
+ /* apply scheduled changes if we can */
if ((err_info = sr_lydmods_sched_apply(sr_mods, conn->ly_ctx, &changed, &fail))) {
goto cleanup_unlock;
}
@@ -174,6 +176,7 @@ sr_connect(const sr_conn_options_t opts, sr_conn_ctx_t **conn_p)
ctx_updated = 1;
}
}
+ }
/* update the connection context modules */
if (!ctx_updated) {
