1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

KCC: don't create duplicate DSA objects

load_site() returns the canonical site even if it didn't make it

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2015-04-02 15:11:12 +13:00 committed by Andrew Bartlett
parent f7b088efa5
commit b9f75c8f1a

View File

@ -172,12 +172,11 @@ class KCC(object):
guid = str(site.site_guid)
if guid not in self.site_table:
self.site_table[guid] = site
self.dsa_by_dnstr.update(site.dsa_table)
self.dsa_by_guid.update((str(x.dsa_guid), x)
for x in site.dsa_table.values())
self.dsa_by_dnstr.update(site.dsa_table)
self.dsa_by_guid.update((str(x.dsa_guid), x)
for x in site.dsa_table.values())
return site
return self.site_table[guid]
def load_my_site(self):
"""Loads the Site class for the local DSA