Allow SSH_CONNECTIONS=0 as long as TLS_CONNECTIONS > 0
Issue-ID: SIM-69
Change-Id: If923c9068bc8c0d50fbbf0430c0782c119a1e754
Signed-off-by: Alex Stancu <alexandru.stancu@highstreet-technologies.com>
ssh_connections = framework_environment.settings.ssh_connections;
}
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");
- 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
}
// create the TLS endpoints in ietf-netconf-server