Skip to content

Commit

Permalink
Merge pull request #36 from Hawk777/fix-listeners-deregistering
Browse files Browse the repository at this point in the history
Do not unregister listeners on unexpected data
  • Loading branch information
XeonSquared authored Jul 27, 2023
2 parents 98fbf0e + 074a980 commit f8903ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions syslog/OpenOS/etc/rc.d/syslogd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ local function wentry(_,msg,level,service,host)
end

local function remote_listener(_,from,port,data)
if port ~= cfg.port then return false end
if port ~= cfg.port then return end
local service, level, msg = data:match("(.-)\t(%d)\t(.+)")
if not service or not level or not msg then return false end
if not service or not level or not msg then return end
msg, level, service = tostring(msg),tonumber(level),tostring(service)
wentry(nil,msg,level,service,from)
end

local function local_listener(_,msg,level,service)
if not service or not level or not msg then return false end
if not service or not level or not msg then return end
msg, level, service = tostring(msg),tonumber(level),tostring(service)
wentry(nil,msg,level,service,hostname)
end
Expand Down

0 comments on commit f8903ad

Please sign in to comment.