config_back_entry_get currently returns the entry directly without
securing the rwlock, which is unsafe. However we can't keep holding it
on return in case the caller decides to hold onto the entry
indefinitely, hence rlock+entry_dup+runlock.
Some values we export in cn=monitor are not managed in a single place,
instead, a task exists that gathers a snapshot of the lloadd state and
stores it for monitor consumption. This exposes a race between the test
reading it out and lloadd updating this cached copy. While we still have
to rely on a shell, rather than being intelligent about whether or not
we should emit a readout into search.out or wait and try again (which is
what test004-monitor does), just filter this attribute out.
Use #elif defined(...) for HAVE_WINSOCK and MACOS. All other instances
of these macros use #ifdef or similar. A compiler may warn about them
not being defined.
In libraries/liblber/sockbuf.c, (DOS && PCNFS) and (DOS && NCSA) were
replaced with HAVE_PCNFS and HAVE_NCSA, respectively. It seems logical
to do the same at the only remaining occurrence of DOS, PCNFS, and NCSA.
Use #if HARDCODE_DATA consistently, replacing two instances of #ifdef.
HARDCODE_DATA is always defined, and this way you can set HARDCODE_DATA
to 0 and have it work, rather than it going down the wrong branch and
failing in these two cases.
The options -h and -p got removed from client tools in commit
66af4cfd5d. However, they were still
present in the options[] array in several client tools source files. So,
if one of those tools got executed with -h or -p followed by a value,
this lead to the error "unrecognized option -", without mentioning
which option was problematic. Removing 'h' and 'p' from options[] fixes
this.
Since the task is not rescheduled until a new operation comes in, close
a race where the reschedule chooses to stop it while the new item is
being added.
Some tasks need to be run once at a given time or the earliest
opportunity, also currently, using interval == 0 on a task triggers
a busy loop inside the scheduling task, halting progress for other
tasks and any other work usually serviced by that thread.
This change deals with both issues at the same time.