653df69 Watchdog: fixes "off-by-one" error

1 file Authored by atikhonov 4 years ago, Committed by pbrezina 4 years ago,
    Watchdog: fixes "off-by-one" error
    
    'man sssd.conf': timeout: "Note that after three missed heartbeats
    the process will terminate itself."
    
    But implementation was:
    ```
    \#define WATCHDOG_MAX_TICKS 3
    ...
        if (__sync_add_and_fetch(&watchdog_ctx.ticks, 1) > WATCHDOG_MAX_TICKS) {
            ...
            _exit(1);
    ```
      -- since after reset ticks start from 0 effectively this was 4 heartbeats.
    
    Fixed to match man page.
    
    Resolves: https://pagure.io/SSSD/sssd/issue/4169
    
    Reviewed-by: Pavel Březina <pbrezina@redhat.com>
    
        
file modified
+1 -1