mirror of
https://github.com/samba-team/samba.git
synced 2025-07-31 20:22:15 +03:00
KCC: fix combine_repl_info
Previous the supposedly combined repl_info was always the default, all 0x11, repl_info. 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:
committed by
Andrew Bartlett
parent
ff7a0902dd
commit
c73a571353
@ -2153,20 +2153,12 @@ def combine_repl_info(info_a, info_b, info_c):
|
||||
if info_b.schedule is None:
|
||||
info_b.schedule = [0xFF] * 84
|
||||
|
||||
new_info = [0] * 84
|
||||
i = 0
|
||||
count = 0
|
||||
while i < 84:
|
||||
# Note that this operation is actually bitwise
|
||||
new_info = info_a.schedule[i] & info_b.schedule[i]
|
||||
if new_info != 0:
|
||||
count += 1
|
||||
i += 1
|
||||
new_info = [a & b for a, b in zip(info_a.schedule, info_b.schedule)]
|
||||
|
||||
if count == 0:
|
||||
if not any(new_info):
|
||||
return False
|
||||
|
||||
info_c.schedule = new_info
|
||||
info_c.schedule = new_info
|
||||
|
||||
# Truncate to MAX_DWORD
|
||||
info_c.cost = info_a.cost + info_b.cost
|
||||
|
Reference in New Issue
Block a user