Commit 45850169 authored by Stefan Metzmacher's avatar Stefan Metzmacher Committed by Karolin Seeger

dbcheck: add find_repl_attid() helper function

BUG: default avatarStefan Metzmacher <>
Reviewed-by: default avatarAndrew Bartlett <>
(cherry picked from commit 598e38d2)
parent 7402d9cf
......@@ -1463,6 +1463,12 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
return error_count
def find_repl_attid(self, repl, attid):
for o in repl.ctr.array:
if o.attid == attid:
return o
return None
def get_originating_time(self, val, attid):
'''Read metadata properties and return the originating time for
......@@ -1472,12 +1478,9 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
repl = ndr_unpack(drsblobs.replPropertyMetaDataBlob, str(val))
obj = repl.ctr
for o in repl.ctr.array:
if o.attid == attid:
return o.originating_change_time
o = self.find_repl_attid(repl, attid)
if o is not None:
return o.originating_change_time
return 0
def process_metadata(self, dn, val):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment