[Date Prev][Date Next] [Chronological] [Thread] [Top]

Question on SLAP_SOCK_*_MUTE macros

Good day, gentlemen!
I was looking thru latest sources of openldap/server and following bits of code confusing a bit.
Could you please spare a moment, look at them, and, if you'll be a gracious enough, explain me where I make a mistake here.

In daemon.c under #ifndef HAVE_POLL clause one may find following (servers/slapd/daemon.c, lines 302-305):
#define SLAP_SOCK_SET_MUTE(s) FD_CLR(s, &readfds)
#define SLAP_SOCK_CLR_MUTE(s) FD_SET(s, &readfds)
#define SLAP_SOCK_IS_MUTE(s) FD_ISSET(s, &readfds)

Shouldn't SLAP_SOCK_IS_MUTE be defined as (!FD_ISSET(s, &readfds)) ?
Because, if treat it as defined, lines 1644-1645 make no sense:
if ( SLAP_SOCK_IS_MUTE( slap_listeners[l]- >sl_sd ))
SLAP_SOCK_CLR_MUTE( slap_listeners[l]- >sl_sd );

Are there any chance that there are typo in definition of SLAP_SOCK_IS_MUTE?

With best regards,

P.S. Please, excuse my poor English