[PATCH] NDOUtils: fix save_custom_variables o_id type, size of es array
Michael Friedrich
michael.friedrich at univie.ac.at
Thu Feb 11 23:55:54 CET 2010
Hi,
I recently ran into those problems and fixed them in IDOUtils. I thought
it would be nice to get them resolved in NDOUtils too.
1/ There was a patch regarding save custom variables function, which
takes o_id as argument of type int. This is wrong because internal
handling of this variable is unsigned long - handed over to function
call and internally used as asprintf %lu too. This patch fixes that.
2/ Having custom variables defined, they will be written to the
database. There are two handlers for es[] - es[0] and es[1]. But the
definition only defines size 1, not 2. When writing es[1] = ... this
will lead to a segfault of ndo2db causing ndomod to produce "error
writing to datasink" outputs in syslog.
By applying this fix, those issues will resolve.
Attached is a git diff patch (I don't use cvs).
Kind regards,
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-save_custom_variables-o_id-type-size-of-es-arra.patch
Type: text/x-diff
Size: 1624 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20100211/04144d7e/attachment.patch>
-------------- next part --------------
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
More information about the Developers
mailing list