nerd: Add opathchecks channel

The output from a subscription here can be piped to gource to draw
a real-time fly-around whizzbang graph of how checkresults come in
from various sources. It's pretty damn cool, even if I do say so
myself.

We still don't support state-based colors, but adding it is a very
quick hack indeed, so it won't be long.

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

Conflicts:
	base/nerd.c

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2275 5f96b256-904b-4d8d-8c98-d829582c6739
query-handler: Initialize qh_listen_sock to -1

Otherwise we'll try to remove socket 0 from the iobroker set,
which might well be registered if we're daemonizing.

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2276 5f96b256-904b-4d8d-8c98-d829582c6739
query-handler: Be noisier when failing

This goes both for adding handlers and when we're initializing.

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2277 5f96b256-904b-4d8d-8c98-d829582c6739
query-handler: actually implement the deinit function

Even though we don't call it yet, it's a good idea to build one to
see where leaks are, and right now we're leaking 16k for every
connected person that doesn't disconnect (in some way).

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2278 5f96b256-904b-4d8d-8c98-d829582c6739
nebmods: Avoid free()'ing core modules

If they want to be free()'d, they'll have to do it themselves.

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2279 5f96b256-904b-4d8d-8c98-d829582c6739
nerd: Use .bss-allocated nebmodule pointer

It makes no sense to allocate it when we can just use a static
one instead.

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

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

Previously we tried to use a NULL pointer to check if we should
add hosts to the check-list when using predictive dependency
checking. The compiler failed to warn us about that, since we
explicitly initialized the temp_hostdependency pointer to NULL
and therefore didn't use it as an unassigned value.

We fix it long-term by moving the declaration to the usage
point and making sure we initialize it.

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2281 5f96b256-904b-4d8d-8c98-d829582c6739
query-handler: Plug a leak in the error path

If we fail to register the socket with the iobroker, we must destroy
the iocache we previously used to handle input.

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2282 5f96b256-904b-4d8d-8c98-d829582c6739
query-handler: Avoid coredumps on incomplete queries

If we get no data from iocache_use_delim(), we must return early
(without errors) so we don't try to dereference a NULL pointer.

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

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