mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 19:55:07 -05:00
refclock: start refid numbering at zero
Commit d92583ed inadvertently changed the refclock refid numbering to
start from 1 instead of 0. Restore the original numbering.
This commit is contained in:
@@ -226,7 +226,7 @@ RCL_AddRefclock(RefclockParameters *params)
|
|||||||
inst->ref_id = params->ref_id;
|
inst->ref_id = params->ref_id;
|
||||||
else {
|
else {
|
||||||
unsigned char ref[5] = { 0, 0, 0, 0, 0 };
|
unsigned char ref[5] = { 0, 0, 0, 0, 0 };
|
||||||
unsigned int index = ARR_GetSize(refclocks);
|
unsigned int index = ARR_GetSize(refclocks) - 1;
|
||||||
|
|
||||||
snprintf((char *)ref, sizeof (ref), "%3.3s", params->driver_name);
|
snprintf((char *)ref, sizeof (ref), "%3.3s", params->driver_name);
|
||||||
ref[3] = index % 10 + '0';
|
ref[3] = index % 10 + '0';
|
||||||
|
|||||||
Reference in New Issue
Block a user