BUG in xodtemplate.c
Dietmar Ruzicka
e9627019 at student.tuwien.ac.at
Mon Nov 10 15:19:15 CET 2003
Hi,
there is a bug in xodtemplate.c in nagios 2.0.
In xodtemplate_expand_hosts you add the regular-expression instead of the
matching host_name. The attached patch fixes the bug.
regards
Dietmar
[nagios at work nagios]$ diff -c xdata/xodtemplate.c.original xdata/xodtemplate.c
*** xdata/xodtemplate.c.original 2003-11-10 14:51:37.000000000 +0100
--- xdata/xodtemplate.c 2003-11-10 15:01:47.000000000 +0100
***************
*** 8876,8882 ****
found_match=TRUE;
/* add host to list */
!
xodtemplate_add_host_to_hostlist(list,temp_ptr);
}
/* free memory allocated to compiled regexp */
--- 8876,8882 ----
found_match=TRUE;
/* add host to list */
!
xodtemplate_add_host_to_hostlist(list,temp_host->host_name);
}
/* free memory allocated to compiled regexp */
[nagios at work nagios]$
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
More information about the Developers
mailing list