downtime: Debug-log when cancelling downtime

That missing link caused a bit of confusion when debugging it.

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2577 5f96b256-904b-4d8d-8c98-d829582c6739
core: Handle removing the current event on I/O broker input

This fixes the possibly silliest bug in the entire world. If one
scheduled flexible downtime which wasn't triggered and a several
commands to remove it arrives between the stop event is peeked
from the scheduling queue but before it's actually executed, we
would end up accessing an already free()'d event, usually
resulting in a SIGSEGV or a SIGBUS.

The maximum window for that was 1.5 seconds (although usually
considerably smaller since internal housekeeping events are
scheduled with fairly frequent intervals), and both commands
had to arrive within that window for the bug to be triggered.

Like I said; Possibly the silliest bug in the world.

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2578 5f96b256-904b-4d8d-8c98-d829582c6739
common/downtime: Fix build error

Bleh...

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2579 5f96b256-904b-4d8d-8c98-d829582c6739
core: Make notification debugging a (lot) easier

Looking up the notification type from a list in the sources is
boring. Especially when Nagios should just tell you what type
it's trying to print.

Since it's kind of useful for other code as well (such as for
example the some-day-to-be-invented NERD notification channel),
we make the id-to-name function publicly accessible.

With this patch we also change the NOTIFICATION_CUSTOM macro
from 99 to 8, for implementation reasons.

This means people from the future who look at debug logs from
today may get confused. The opposite isn't true ofcourse, since
the debug logs in the future will hold a string explaining what
kind of notification we're trying to send without requiring the
manual decoding that's done today.

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

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