Awesome, it compiled!

 

Thanks for your help.

 


From: Adrian Hungate [mailto:[EMAIL PROTECTED]
Sent: Sunday, April 30, 2006 7:39 AM
To: Danny Russell
Subject: RE: [Nagios-users] Nagios NEB Nagios-DB Install Guide

 

Hi there Danny!

I saw your message to the nagios-users list about the
neb_register_callback problem compiling inserter.c for nagios-db. I am also having the same problem. It would appear that nagios-db was written for an earlier version of the nagios API, and the neb_register_callback now takes an additional parameter.

The new signature is

 
int neb_register_callback(int callback_type, void *mod_handle, int priority, int (*callback_func)(int,void *));

which obviously differs from the earlier version. My guess is that the void *mod_handle is the new part and I am looking to work out what that should contain. My guess is that this is the nebmodule parameter to the nebmodule_init function.

I added the following line to the global defines for the file:

 
nebmodule *nebhandle;

Then I've added

 
nebhandle = handle;

as the first executable line in nebmodule_init, then each call needs nebhandle inserting as its second parameter, i.e.

 
neb_register_callback(NEBCALLBACK_TIMED_EVENT_DATA, nebhandle, 0, loadconfig);

etc...

Hope this helps...

Adrian...

P.S.: I just found this http://www.barbich.net/websvn/wsvn/nagios?op=comp&[EMAIL PROTECTED]&[EMAIL PROTECTED] which may help you. It appears to make the same change I made, but also changes the name of one of the callback events. YMMV

--
Adrian Hungate <[EMAIL PROTECTED]>

 

Reply via email to