diff options
Diffstat (limited to 'tools/plink/pinger.c')
-rw-r--r-- | tools/plink/pinger.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/plink/pinger.c b/tools/plink/pinger.c index b6fde2456..00cd6675e 100644 --- a/tools/plink/pinger.c +++ b/tools/plink/pinger.c @@ -43,11 +43,11 @@ static void pinger_schedule(Pinger pinger) }
}
-Pinger pinger_new(Config *cfg, Backend *back, void *backhandle)
+Pinger pinger_new(Conf *conf, Backend *back, void *backhandle)
{
Pinger pinger = snew(struct pinger_tag);
- pinger->interval = cfg->ping_interval;
+ pinger->interval = conf_get_int(conf, CONF_ping_interval);
pinger->pending = FALSE;
pinger->back = back;
pinger->backhandle = backhandle;
@@ -56,10 +56,11 @@ Pinger pinger_new(Config *cfg, Backend *back, void *backhandle) return pinger;
}
-void pinger_reconfig(Pinger pinger, Config *oldcfg, Config *newcfg)
+void pinger_reconfig(Pinger pinger, Conf *oldconf, Conf *newconf)
{
- if (oldcfg->ping_interval != newcfg->ping_interval) {
- pinger->interval = newcfg->ping_interval;
+ int newinterval = conf_get_int(newconf, CONF_ping_interval);
+ if (conf_get_int(oldconf, CONF_ping_interval) != newinterval) {
+ pinger->interval = newinterval;
pinger_schedule(pinger);
}
}
|