From 97c285b7343d70d1a4695e5894d50aa5acbdeea1 Mon Sep 17 00:00:00 2001 From: "cebka@lenovo-laptop" Date: Mon, 25 Jan 2010 15:35:38 +0300 Subject: [PATCH] * Do not produce lua warning when message has no headers or has unresolved hostname --- src/plugins/lua/once_received.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/lua/once_received.lua b/src/plugins/lua/once_received.lua index bf8e31462..d858314dd 100644 --- a/src/plugins/lua/once_received.lua +++ b/src/plugins/lua/once_received.lua @@ -14,9 +14,13 @@ function check_quantity_received (task) -- Strict checks if symbol_strict then local r = recvh[1] + if not r then + return + end -- Unresolved host if not r['real_hostname'] or string.lower(r['real_hostname']) == 'unknown' or string.match(r['real_hostname'], '^%d+%.%d+%.%d+%.%d+$') then task:insert_result(metric, symbol_strict, 1) + return end local i = true -- 2.39.5