sources: don't reset active status

Avoid resetting the active status when an NTP source changes its
address in NCR_ChangeRemoteAddress().

This will allow an NTP source to update its address with NTS-KE
hostname negotiation and continue in a special reference mode
(e.g. -q/-Q option).
This commit is contained in:
Miroslav Lichvar 2019-11-12 18:04:48 +01:00
parent 83010590af
commit 1e727c4497

View file

@ -249,6 +249,7 @@ SRC_Instance SRC_CreateNewInstance(uint32_t ref_id, SRC_Type type, int sel_optio
result->index = n_sources; result->index = n_sources;
result->type = type; result->type = type;
result->sel_options = sel_options; result->sel_options = sel_options;
result->active = 0;
SRC_SetRefid(result, ref_id, addr); SRC_SetRefid(result, ref_id, addr);
SRC_ResetInstance(result); SRC_ResetInstance(result);
@ -291,7 +292,6 @@ void SRC_DestroyInstance(SRC_Instance instance)
void void
SRC_ResetInstance(SRC_Instance instance) SRC_ResetInstance(SRC_Instance instance)
{ {
instance->active = 0;
instance->updates = 0; instance->updates = 0;
instance->reachability = 0; instance->reachability = 0;
instance->reachability_size = 0; instance->reachability_size = 0;