sid0-problem

master
Denis Knauf 2010-03-30 01:15:03 +02:00
parent 53bf167fd1
commit 3f267e2ca2
2 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,7 @@ require 'logan/cache'
module LogAn::Inc
class Main < RobustServer
def cache db, type, &e
def cache ret, type, &e
type ||= 1+4
ret = LogAn::AutoValueConvertHash.new ret, &e if type&4 > 0 or e
ret = LogAn::Cache.new ret, type&3 if type&3 > 0

View File

@ -92,12 +92,13 @@ class LogAn::Inc::Server < ::Select::Server
def init opts
super opts
@sid0 = LogAn::Inc::SID0.new
@config = opts[:config] or raise( ArgumentError, "#{self.class} needs a Config!")
end
def event_cmd cmd
sid, line = cmd.unpack 'Na*'
fps = @config[:fileparser][sid]
fp = sid == 0 ? @sid0 : @config[:fileparser][sid]
fp.event_line line, self if fp
end
end