Skip to content

Commit

Permalink
watchdog: Fix applying the default watchdog timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
inouekazu committed Jan 14, 2015
1 parent ad91908 commit a765ca6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions exec/wd.c
Expand Up @@ -585,7 +585,11 @@ static void wd_scan_resources (void)
static void watchdog_timeout_apply (uint32_t new)
{
struct watchdog_info ident;
uint32_t original_timeout = watchdog_timeout;
uint32_t original_timeout = 0;

if (dog > 0) {
ioctl(dog, WDIOC_GETTIMEOUT, &original_timeout);
}

if (new == original_timeout) {
return;
Expand Down Expand Up @@ -717,9 +721,6 @@ static char *wd_exec_init_fn (struct corosync_api_v1 *corosync_api)

wd_scan_resources();

api->timer_add_duration(tickle_timeout*MILLI_2_NANO_SECONDS, NULL,
wd_tickle_fn, &wd_timer);

return NULL;
}

Expand Down

0 comments on commit a765ca6

Please sign in to comment.