mark hosts as alive when adding notes or services

git-svn-id: file:///home/svn/framework3/trunk@8627 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2010-02-24 22:54:16 +00:00
parent f5446b5d4f
commit 27cda778a8
1 changed files with 5 additions and 0 deletions

View File

@ -263,6 +263,9 @@ class DBManager
task = queue(Proc.new {
host = get_host(:workspace => wspace, :address => addr)
host.state = HostState::Alive
host.save! if host.changed?
proto = opts[:proto] || 'tcp'
opts[:name].downcase! if (opts[:name])
@ -430,6 +433,8 @@ class DBManager
if addr and not host
host = get_host(:workspace => wspace, :host => addr)
end
host.state = HostState::Alive
host.save! if host.changed?
ntype = opts.delete(:type) || opts.delete(:ntype) || return
data = opts[:data] || return