X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=sim%2Fo1-interface.git;a=blobdiff_plain;f=ntsimulator%2Fntsim-ng%2Fcore%2Fnc_config.c;h=770059529ef61e917929af142e5b3bcf846d7eea;hp=fdd1bd9b064f1680fcfd3aef1f64a1f78ed78844;hb=a1eba9f419825263f5fe60a83405d2287f6bd88e;hpb=6d03d77e2110c880c63c8716385d2b936ccc4b78 diff --git a/ntsimulator/ntsim-ng/core/nc_config.c b/ntsimulator/ntsim-ng/core/nc_config.c index fdd1bd9..7700595 100644 --- a/ntsimulator/ntsim-ng/core/nc_config.c +++ b/ntsimulator/ntsim-ng/core/nc_config.c @@ -630,15 +630,17 @@ static int configure_endpoints_connections(sr_session_ctx_t *session) { ssh_connections = framework_environment.settings.ssh_connections; } - if(ssh_connections == 0) { - log_error("ssh_connections must be at least 1\n"); + if(ssh_connections + framework_environment.settings.tls_connections == 0) { + log_error("ssh_connections + tls_connections must be at least 1\n"); return NTS_ERR_FAILED; } - rc = create_ssh_listen_endpoints(netconf_node, ssh_connections); - if(rc != NTS_ERR_OK) { - log_error("could not create %d SSH Listen endpoints on the NETCONF Server\n", ssh_connections); - return NTS_ERR_FAILED; + if (ssh_connections > 0) { + rc = create_ssh_listen_endpoints(netconf_node, ssh_connections); + if(rc != NTS_ERR_OK) { + log_error("could not create %d SSH Listen endpoints on the NETCONF Server\n", ssh_connections); + return NTS_ERR_FAILED; + } } // create the TLS endpoints in ietf-netconf-server