if( !inetd ) {
for ( l = 0; l < N_LISTENERS; l++ ) {
+ if ( listeners[l].tcps < 0 )
+ continue;
if ( listen( listeners[l].tcps, 5 ) == -1 ) {
int err = errno;
Debug( LDAP_DEBUG_ANY,
#endif
for ( l = 0; l < N_LISTENERS; l++ ) {
+ if ( listeners[l].tcps < 0 )
+ continue;
FD_SET( (unsigned) listeners[l].tcps, &readfds );
}
#endif
for ( i = 0; i < N_LISTENERS; i++ ) {
+ if ( listeners[l].tcps < 0 )
+ continue;
Debug( LDAP_DEBUG_CONNS,
"daemon: select: tcps=%d active_threads=%d tvp=%s\n",
listeners[i].tcps, at,
int len = sizeof(from);
long id;
+ if ( listeners[l].tcps < 0 )
+ continue;
if ( !FD_ISSET( listeners[l].tcps, &readfds ) )
continue;
#endif
char *serverName;
int serverMode = SLAP_SERVER_MODE;
+ int use_tls_port = 0;
(void) memset( (void*) &bind_addr, '\0', sizeof(bind_addr));
bind_addr.sin_family = AF_INET;
"n:"
#endif
#ifdef HAVE_TLS
- "P:"
+ "P:T"
#endif
)) != EOF ) {
switch ( i ) {
case 'n': /* NT service name */
NTservice = ch_strdup( optarg );
break;
+#endif
+#ifdef HAVE_TLS
+ case 'T': /* Bind on TLS port */
+ use_tls_port = 1;
#endif
default:
usage( argv[0] );
if ( tcps == -1 )
goto destroy;
#ifdef HAVE_TLS
- tls_tcps = set_socket( inetd ? NULL : &tls_bind_addr );
- if ( tls_tcps == -1 )
- goto destroy;
+ if ( use_tls_port ) {
+ tls_tcps = set_socket( inetd ? NULL : &tls_bind_addr );
+ if ( tls_tcps == -1 )
+ goto destroy;
+ } else {
+ tls_tcps = -1;
+ }
#endif
(void) SIGNAL( LDAP_SIGUSR1, slap_do_nothing );