Fix warning when report_service() contains host_name/host_mac

git-svn-id: file:///home/svn/framework3/trunk@8947 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2010-03-28 16:53:55 +00:00
parent d49ed8b366
commit 900fb250a2
1 changed files with 6 additions and 9 deletions

View File

@ -255,19 +255,16 @@ class DBManager
#
def report_service(opts)
return if not active
addr = opts.delete(:host) || return
addr = opts.delete(:host) || return
hname = opts.delete(:host_name)
hmac = opts.delete(:host_mac)
wait = opts.delete(:wait)
wspace = opts.delete(:workspace) || workspace
hopts = {:workspace => wspace, :host => addr}
if opts[:host_name]
hopts[:name] = opts.delete(:host_name)
end
if opts[:host_mac]
hopts[:mac] = opts.delete(:host_mac)
end
hopts[:name] = hname if hname
hopts[:mac] = hmac if hmac
report_host(hopts)
ret = {}