qh: Fall for peer pressure from myself, and implement some help

This is still quite sparse, as it's intended as inline help and hints,
rather than as complete documentation, but it should still prove
helpful.

While at it, we remove some mangling remnants from the nerd query
handler.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2489 5f96b256-904b-4d8d-8c98-d829582c6739
Revert "common/macros: Always log warnings from macro resolutions"

This reverts commit efda1f7bf770759edfc9ca2d8d4f2c31fb196ea4.

As it turns out, this can yield an enourmous amount of log spam,
so we leave it to the debug log like it once was.

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2490 5f96b256-904b-4d8d-8c98-d829582c6739
nerd: Use the nerd: prefix for our "initialized" log message

It's nifty to grep on, so let's make that possible.

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2491 5f96b256-904b-4d8d-8c98-d829582c6739
qh: Let registrars supply a description of the service they provide

This is supposed to be a brief message that we print when listing the
registered handlers to help users who are unfamiliar with the various
handlers.

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2492 5f96b256-904b-4d8d-8c98-d829582c6739
qh: Be less strict with query format

With this patch, we stop requiring '@' or '#' as query-prefixes.
They can still be used to denote "keepalive" or "oneshot" queries,
respectively, but we no longer require them to be present and fall
back to 'keepalive' if neither of them is. Queries without a magic
byte-prefix will thus get a persistent connection.

We also stop requiring a specific query and pass a nul byte buffer
with length 0 in case none is passed. Handlers can respond to this
in any way they like, although a strong suggestion (which we also
follow) is that (empty-query) = "help", unless other compelling
options exist.

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

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2493 5f96b256-904b-4d8d-8c98-d829582c6739
xodtemplate: Fix crash when referring to invalid servicegroups

The code for printing error messages when a service is referring to an
invalid servicegroup was incorrect, because it used the wrong pointer -
which can be uninitialized - for writing file and line of the error.

In other words: when you do things incorrectly, nagios will no longer do
so too.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2494 5f96b256-904b-4d8d-8c98-d829582c6739
nerd: Implement query handler help

This help is dynamically generated, as requested by Andreas Ericsson.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>

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