<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Awesome, it compiled!<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks for your help.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Adrian Hungate
[mailto:adrian@haqa.co.uk] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Sunday, April 30, 2006 7:39
AM<br>
<b><span style='font-weight:bold'>To:</span></b> Danny Russell<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [Nagios-users] Nagios
NEB Nagios-DB Install Guide</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hi there Danny!<br>
<br>
I saw your message to the nagios-users list about the </span></font><font
size=2><span style='font-size:10.0pt'>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.</span></font><br>
<br>
The new signature is <o:p></o:p></p>

<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 color=maroon face="Courier New"><span style='font-size:10.0pt;
color:maroon'>int neb_register_callback(int callback_type, void *mod_handle, int priority, int (*callback_func)(int,void *));</span></font><o:p></o:p></pre>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>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.<br>
<br>
I added the following line to the global defines for the file: <o:p></o:p></span></font></p>

<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 color=maroon face="Courier New"><span style='font-size:10.0pt;
color:maroon'>nebmodule *nebhandle;</span></font><o:p></o:p></pre>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Then I've added <o:p></o:p></span></font></p>

<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 color=maroon face="Courier New"><span style='font-size:10.0pt;
color:maroon'>nebhandle = handle;</span></font><o:p></o:p></pre>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>as the first executable line in nebmodule_init, then each call needs
nebhandle inserting as its second parameter, i.e. <o:p></o:p></span></font></p>

<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 color=maroon face="Courier New"><span style='font-size:10.0pt;
color:maroon'>neb_register_callback(NEBCALLBACK_TIMED_EVENT_DATA, nebhandle, 0, loadconfig);</span></font><o:p></o:p></pre>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>etc...<br>
<br>
Hope this helps...<br>
<br>
<st1:City w:st="on"><st1:place w:st="on">Adrian</st1:place></st1:City>...<br>
<br>
P.S.: I just found this <a
href="http://www.barbich.net/websvn/wsvn/nagios?op=comp&compare%5B%5D=%2Fnagios%2Fpatches@1&compare%5B%5D=%2Fnagios%2Fpatches@54">http://www.barbich.net/websvn/wsvn/nagios?op=comp&compare%5B%5D=%2Fnagios%2Fpatches@1&compare%5B%5D=%2Fnagios%2Fpatches@54</a>
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<o:p></o:p></span></font></p>

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
 style='width:100.0%'>
 <tr>
  <td style='padding:0in 0in 0in 0in'>
  <p class=MsoNormal><font size=3 face="Times New Roman"><span
  style='font-size:12.0pt'>-- <br>
  Adrian Hungate <<a href="mailto:adrian@haqa.co.uk">adrian@haqa.co.uk</a>>
  <o:p></o:p></span></font></p>
  </td>
 </tr>
</table>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

</div>

</body>

</html>