refclock: fix invalid warning in local mode

A refclock in the local mode is locked to itself by design.

Reported-by: Dan Drown <dan-ntp@drown.org>
This commit is contained in:
Miroslav Lichvar 2022-05-09 16:41:27 +02:00
parent e66f1df89d
commit a3b376cf0a

View file

@ -308,7 +308,7 @@ RCL_StartRefclocks(void)
break;
}
if (lock_index == -1 || lock_index == i)
if (lock_index == -1 || (lock_index == i && !inst->local))
LOG(LOGS_WARN, "Invalid lock refid %s", UTI_RefidToString(inst->lock_ref));
}