This commit is contained in:
crusader 2018-09-18 02:20:30 +09:00
parent e8cff368de
commit 34f3f59837

View File

@ -756,7 +756,7 @@ func (ds *ofDiscoverySession) addtionalServiceMDNS(service *omd.Service, meta ma
func (ds *ofDiscoverySession) appendDiscoveredBy(discoveredBy *omm.MetaDiscovererType, oriDiscoveredBy []*omm.MetaDiscovererType) (resultDiscoveredBy []*omm.MetaDiscovererType, modified bool) { func (ds *ofDiscoverySession) appendDiscoveredBy(discoveredBy *omm.MetaDiscovererType, oriDiscoveredBy []*omm.MetaDiscovererType) (resultDiscoveredBy []*omm.MetaDiscovererType, modified bool) {
modified = false modified = false
if "" == discoveredBy.Key { if nil == discoveredBy {
resultDiscoveredBy = oriDiscoveredBy resultDiscoveredBy = oriDiscoveredBy
return return
} }
@ -770,7 +770,7 @@ func (ds *ofDiscoverySession) appendDiscoveredBy(discoveredBy *omm.MetaDiscovere
} }
for _, v := range oriDiscoveredBy { for _, v := range oriDiscoveredBy {
if v == discoveredBy { if v.Key == discoveredBy.Key {
resultDiscoveredBy = oriDiscoveredBy resultDiscoveredBy = oriDiscoveredBy
return return
} }