From: Howard Chu Date: Fri, 6 Aug 2010 03:32:42 +0000 (+0000) Subject: Fix up winsock init X-Git-Tag: MIGRATION_CVS2GIT~531 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5cf46a8820d31dc1ba8d562de7902b5dc011fd51;p=openldap Fix up winsock init --- diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index ad01fd7be5..65d21dee8e 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -554,11 +554,11 @@ static slap_daemon_st slap_daemon[MAX_DAEMON_THREADS]; slap_daemon[t].sd_flags = (char *)(slapd_ws_sockets + dtblsize); \ slap_daemon[t].sd_rflags = slap_daemon[t].sd_flags + dtblsize; \ memset( slap_daemon[t].sd_flags, 0, dtblsize ); \ - slapd_ws_sockets[0] = wake_sds[t][0]; \ - slapd_ws_sockets[1] = wake_sds[t][1]; \ - wake_sds[0] = 0; \ - wake_sds[1] = 1; \ - slap_daemon[t].sd_nfds = 2; \ + slapd_ws_sockets[t*2] = wake_sds[t][0]; \ + slapd_ws_sockets[t*2+1] = wake_sds[t][1]; \ + wake_sds[0] = t*2; \ + wake_sds[1] = t*2+1; \ + slap_daemon[t].sd_nfds = t*2 + 2; \ } while ( 0 ) # define SLAP_SOCK_DESTROY(t) do { \ @@ -1611,8 +1611,7 @@ slapd_daemon_init( const char *urls ) wake_sds[i][1] = AC_SOCKET_INVALID; } - for ( i=0; i