X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=sim%2Fo1-interface.git;a=blobdiff_plain;f=ntsimulator%2Fsrc%2Fntsimulator-manager%2Fntsimulator-manager.c;h=3571ab4667638cd1e84e93ea18c999b8c9859468;hp=b4e1a0f8d55d1c3ed329892afd52b451400eff9e;hb=5a191a7449347ed5c419720de89d2e4a0194c21e;hpb=226e12e7c9b504dc32fcf71f97483bb97195643d diff --git a/ntsimulator/src/ntsimulator-manager/ntsimulator-manager.c b/ntsimulator/src/ntsimulator-manager/ntsimulator-manager.c index b4e1a0f..3571ab4 100644 --- a/ntsimulator/src/ntsimulator-manager/ntsimulator-manager.c +++ b/ntsimulator/src/ntsimulator-manager/ntsimulator-manager.c @@ -309,36 +309,44 @@ simulator_config_change_cb(sr_session_ctx_t *session, const char *module_name, s goto sr_error; } - sr_free_val(val); - val = NULL; + if (strcmp(val->data.enum_val, "basic-auth") == 0) + { + sr_free_val(val); + val = NULL; - /* get the value from sysrepo, we do not care if the value did not change in our case */ - rc = sr_get_item(session, "/network-topology-simulator:simulator-config/ves-endpoint-details/ves-endpoint-username", &val); - if (rc != SR_ERR_OK) { - goto sr_error; - } + /* get the value from sysrepo, we do not care if the value did not change in our case */ + rc = sr_get_item(session, "/network-topology-simulator:simulator-config/ves-endpoint-details/ves-endpoint-username", &val); + if (rc != SR_ERR_OK) { + goto sr_error; + } - rc = ves_username_changed(val->data.string_val); - if (rc != SR_ERR_OK) { - goto sr_error; - } + rc = ves_username_changed(val->data.string_val); + if (rc != SR_ERR_OK) { + goto sr_error; + } - sr_free_val(val); - val = NULL; + sr_free_val(val); + val = NULL; - /* get the value from sysrepo, we do not care if the value did not change in our case */ - rc = sr_get_item(session, "/network-topology-simulator:simulator-config/ves-endpoint-details/ves-endpoint-password", &val); - if (rc != SR_ERR_OK) { - goto sr_error; - } + /* get the value from sysrepo, we do not care if the value did not change in our case */ + rc = sr_get_item(session, "/network-topology-simulator:simulator-config/ves-endpoint-details/ves-endpoint-password", &val); + if (rc != SR_ERR_OK) { + goto sr_error; + } - rc = ves_password_changed(val->data.string_val); - if (rc != SR_ERR_OK) { - goto sr_error; - } + rc = ves_password_changed(val->data.string_val); + if (rc != SR_ERR_OK) { + goto sr_error; + } - sr_free_val(val); - val = NULL; + sr_free_val(val); + val = NULL; + } + else + { + sr_free_val(val); + val = NULL; + } /* get the value from sysrepo, we do not care if the value did not change in our case */ rc = sr_get_item(session, "/network-topology-simulator:simulator-config/ves-endpoint-details/ves-endpoint-port", &val);