xod: Be more verbose when warning about deprecated variables

This makes it easier to find and fix the problem areas.

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2214 5f96b256-904b-4d8d-8c98-d829582c6739
xod: Add a missing timing point

Inheriting object properties can take a considerable amount of time,
so we'd better tell people where we spent it.

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

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

Not 4.0 quite yet, but it's not far now :)

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2216 5f96b256-904b-4d8d-8c98-d829582c6739
xod: Avoid strdup()'ing alias and address for hosts

We assign them in add_host() anyway, so this was just a waste of
cycles.

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2217 5f96b256-904b-4d8d-8c98-d829582c6739
Make the HOST_{UP,DOWN,UNREACHABLE} macros globally trustworthy

include/statusdata.h has earlier re-defined them with other values,
leading to no small amount of headache when doing changes that both
cgi's and core should benefit from. This patch removes the "special"
HOST_* macros and renames them SD_HOST_* instead (thank you, sed).

This also makes it a lot easier to reconcile the builds (which is
kinda low on my todo-list, but still on there), so we can get rid
of a ton of ifdef's in the code and unify a lot of the codepaths.

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2218 5f96b256-904b-4d8d-8c98-d829582c6739
Remove the integers-acting-as-flags thinking

This patch has large ramifications for nebmods.

All the "fail_on_ok", "notify_on_down" fields that map naturally to
a bitgate for monitored objects' current_state variable has now been
turned into such bitgates. The bitgate is managed with the standard
paradigm "1 << enum_value", where our enum_value is "current_state"
from either a host or a service.

We provide accessor macros for handling flags properly so as to
avoid bitmath errors (or rather, to get a single place where we can
fix any such errors).

This is one step further on the road that leads to a merge of host
and service objects (and their slave objects).

The changes are added to the list in api-incompat3to4.dox.

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

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

They will almost certainly need some tweaking, but the basic and
very simple idea is that we will block notifications if the parent
service(s) is/are anything but OK. As with hosts; One good parent
is enough to cause notification blockage from happening.

Check scheduling is not affected in any way, and there is a whole
host of other things that probably have to be done for this to
work as people expect it, but this is good enough to be going on
with for now, as this is the change that breaks the object API
and thus has to be done before Nagios 4.

It's worth noting that we don't verify cyclic paths for services,
since we never walk that chain beyond our immediate parents.

It's also worth noting that xdata/xodtemplate.c is now an even
ungodlier mess of #ifdef NSCORE and #ifndef NSCGI. That can't
be helped, since I flat out refuse to parse service parents
manually.

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

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