sources: add flag that source is active

When source is set as active, it's receiving reachability updates (e.g.
offline NTP sources are not active).

Also add function to count active sources.
This commit is contained in:
Miroslav Lichvar
2014-04-10 16:53:28 +02:00
parent bc6b40568d
commit 8671002bd7
4 changed files with 60 additions and 12 deletions

View File

@@ -267,6 +267,7 @@ RCL_StartRefclocks(void)
RCL_Instance inst = &refclocks[i];
SRC_SetSelectable(inst->source);
SRC_SetActive(inst->source);
inst->timeout_id = SCH_AddTimeoutByDelay(0.0, poll_timeout, (void *)inst);
if (inst->lock_ref) {