checks: no auto-const-set (was unclean), cl-parameter removed.

master
Denis Knauf 2013-04-09 15:33:22 +02:00
parent 7832b62b51
commit 0480986133
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,6 @@ TO DO AND DONE
TODO
----
* build packet with performance data
* server side parsing of performance data
* more documentations
* mcrypt-support
@ -30,6 +29,7 @@ DONE
* server-API (recv from client)
* check-API (describe checks and performance data)
* fast usable API for sending checks
* build packet with performance data
Copyright
=========

View File

@ -186,12 +186,12 @@ module NSCA
end
module Checks
def perfdata( cl, *params) const_set cl, NSCA::PerformanceData.new( *params) end
def perfdata( *params) NSCA::PerformanceData.new( *params) end
def check cl, service, hostname, perfdatas = nil
def check service, hostname, perfdatas = nil
perfdatas ||= []
perfdatas.map! {|cl| cl.is_a?( Symbol) ? const_get( cl) : cl }
const_set cl, NSCA::Check.new( service, hostname, perfdatas)
NSCA::Check.new service, hostname, perfdatas
end
end
end