try to preserve the service name in the case of incorrect report_note usage

git-svn-id: file:///home/svn/framework3/trunk@10464 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2010-09-24 21:11:36 +00:00
parent c00d56d560
commit 7878273131
1 changed files with 6 additions and 2 deletions

View File

@ -525,15 +525,19 @@ class DBManager
proto = opts[:proto]
when 'dns','snmp','dhcp'
proto = 'udp'
sname = opts[:proto]
else
proto = 'tcp'
sname = opts[:proto]
end
report_service(
sopts = {
:workspace => wspace,
:host => opts[:host],
:port => opts[:port],
:proto => proto
)
}
sopts[:name] = sname if sname
report_service(sopts)
end
end
# Update Modes can be :unique, :unique_data, :insert