2 calls to unlink in checkresults

Mathieu Gagné mgagne at iweb.com
Tue May 19 19:21:26 CEST 2009


Hi,

On 5/19/09 5:01 AM, Andreas Ericsson wrote:
>> Since process_check_result_queue() has already loaded all checkresult
>> files in a list in memory (by calling add_check_result_to_list() in
>> process_check_result_file()), reap_check_results() shouldn't call
>> delete_check_result_file() at all.
>>
>> Does it make any sense to you?
>>
>
> Yes, but it seems unnecessarily complex. I think I'll revamp it so
> it's read once and deleted immediately after.
>

Here is a patch against Nagios 3.0.6 fixing the problem. 
delete_check_result_file() is now called from 
process_check_result_file() only.

Feel free to comment and/or improve it.

--
Mathieu
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix_multiple_calls_to_delete_check_result_file.patch
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20090519/e218108b/attachment.ksh>
-------------- next part --------------
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
-------------- 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