Skip to content

Commit

Permalink
KCC: Add comments regarding time handling
Browse files Browse the repository at this point in the history
Signed-off-by: Douglas Bagnall <[email protected]>
Reviewed-by: Garming Sam <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
  • Loading branch information
douglasbagnall authored and abartlet committed May 28, 2015
1 parent 9d2a315 commit c7d39d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/samba/kcc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,7 @@ def select_istg(self, samdb, mydsa, ro):
# interSiteTopologyFailover (if set) appears to be in minutes
# so we'll need to convert to senconds and then 100 nanosecond
# intervals
# XXX [MS-ADTS] 6.2.2.3.1 says it is seconds, not minutes.
#
# 10,000,000 is number of 100 nanosecond intervals in a second
if self.site_topo_failover == 0:
Expand Down Expand Up @@ -1597,6 +1598,9 @@ def select_istg(self, samdb, mydsa, ro):
i_idx = j_idx
t_time = 0

#XXX doc says current time < c.timeLastSyncSuccess - f
# which is true only if f is negative or clocks are wrong.
# f is not negative in the default case (2 hours).
elif ntnow - cursor.last_sync_success > f:
i_idx = 0
t_time = 0
Expand Down

0 comments on commit c7d39d0

Please sign in to comment.