;
*p = c;
- service->max_connections--;
+ if (service->max_connections != CONNECTION_LIMIT_UNLIMITED)
+ service->max_connections--;
return ERROR_OK;
}
*p = c->next;
free(c);
- service->max_connections++;
+ if (service->max_connections != CONNECTION_LIMIT_UNLIMITED)
+ service->max_connections++;
+
break;
}
/* handle new connections on listeners */
if ((service->fd != -1)
&& (FD_ISSET(service->fd, &read_fds))) {
- if (service->max_connections > 0)
+ if (service->max_connections != 0)
add_connection(service, command_context);
else {
if (service->type == CONNECTION_TCP) {
return ERROR_OK;
}
- return add_service("tcl", tcl_port, 1,
+ return add_service("tcl", tcl_port, CONNECTION_LIMIT_UNLIMITED,
&tcl_new_connection, &tcl_input,
&tcl_closed, NULL);
}
return add_service("telnet",
telnet_port,
- 1,
+ CONNECTION_LIMIT_UNLIMITED,
telnet_new_connection,
telnet_input,
telnet_connection_closed,