Listener **slap_listeners = NULL;
+#define SLAPD_LISTEN 10
+
static ber_socket_t wake_sds[2];
#ifdef NO_THREADS
tcp_close(s);
}
-static slap_free_listener_addresses(struct sockaddr **sal)
+static void slap_free_listener_addresses(struct sockaddr **sal)
{
struct sockaddr **sap;
/* host specifies a service in this case */
if (err = getaddrinfo(NULL, host, &hints, &res)) {
Debug( LDAP_DEBUG_ANY, "daemon: getaddrinfo failed: %s\n",
- gai_strerror(err), 0, 0);
+ AC_GAI_STRERROR(err), 0, 0);
return -1;
}
} else
if ( slap_listeners[l]->sl_sd == AC_SOCKET_INVALID )
continue;
- if ( listen( slap_listeners[l]->sl_sd, 5 ) == -1 ) {
+ if ( listen( slap_listeners[l]->sl_sd, SLAPD_LISTEN ) == -1 ) {
int err = sock_errno();
Debug( LDAP_DEBUG_ANY,
"daemon: listen(%s, 5) failed errno=%d (%s)\n",
}
for ( l = 0; slap_listeners[l] != NULL; l++ ) {
- ber_int_t s;
+ ber_socket_t s;
socklen_t len = sizeof(from);
long id;
slap_ssf_t ssf = 0;