lib/kvvec: s/kvvec_grow/kvvec_resize/

This bug stems from the time when 'grow' actually meant 'resize',
but since the 'buf2kvvec_prealloc()' introduction it could (and did)
mean that callers might get key/value vectors that grew out of
control, by roughly 22 indices per new check-result caught. Not too
hot in long-running daemons.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2055 5f96b256-904b-4d8d-8c98-d829582c6739
Fix build machinery for modules and contrib

It broke sometime during the mega-change period. This restores it
in good working order again.

Patched-by: Daniel Wittenberg <dwittenberg2008@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2056 5f96b256-904b-4d8d-8c98-d829582c6739
Update nagios.spec as per Daniel Wittenberg's suggestion

He's the one testing it, so he gets to call the shots.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2057 5f96b256-904b-4d8d-8c98-d829582c6739
Silence ridiculous autoconf warnings about datarootdir

It really *should* be up to us if we want to use it or not, but
apparently that's not the case with autoconf >= 2.60, so we get
rid of the warnings by consigning the variable to oblivion where
we don't care about it.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2058 5f96b256-904b-4d8d-8c98-d829582c6739
lib/wproc: Make it compile and work again

It hasn't since we added the flags argument to the buf2kvvec()
function.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2059 5f96b256-904b-4d8d-8c98-d829582c6739
Combine common macro declarations

Both cgi's and core hade STATE_WARNING etc defined in their own
headers, but with identical values (and comments). This patch just
moves them to the common header and leaves it at that.

Disentangling the fact that HOST_UNREACHABLE etc has different
values is another beast best left to the glorious day when we no
longer need to worry about the UI at all.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2060 5f96b256-904b-4d8d-8c98-d829582c6739
core: Remove and obsolete sleep_time

We're event-driven now, which means we'll always sleep when there's
nothing to do, and never sleep when there's work to do. Since we're
also far more effective than earlier, even quite large configs are
far from making Nagios reach 10% cpu usage.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2061 5f96b256-904b-4d8d-8c98-d829582c6739
core: Fix typos in xdata/xrddefault

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2062 5f96b256-904b-4d8d-8c98-d829582c6739
Janitor patch: Clear up global and unused variable

A lot of global variables are declared in files that doesn't use
them, and a lot of variables were set but not used, leading to
wasted cycles when using less clever compilers than gcc 4.x.

This patch clears up the cruft, and manages to kill some of the
(very many) global variables.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2063 5f96b256-904b-4d8d-8c98-d829582c6739
core: Remove dead code

Long callchains that end with a comment saying "we don't do this"
are just annoying when refactoring, so we remove them, along with
some long-since outcommented code.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2064 5f96b256-904b-4d8d-8c98-d829582c6739