mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 06:35:07 -05:00
Make default refclock refid from number of the source
It should avoid having two or more refclocks with the same refid.
This commit is contained in:
@@ -145,7 +145,7 @@ RCL_AddRefclock(RefclockParameters *params)
|
|||||||
else {
|
else {
|
||||||
unsigned char ref[5] = { 0, 0, 0, 0, 0 };
|
unsigned char ref[5] = { 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
snprintf((char *)ref, 5, "%s%s", params->driver_name, params->driver_parameter);
|
snprintf((char *)ref, 5, "%3s%d", params->driver_name, n_sources % 10);
|
||||||
inst->ref_id = ref[0] << 24 | ref[1] << 16 | ref[2] << 8 | ref[3];
|
inst->ref_id = ref[0] << 24 | ref[1] << 16 | ref[2] << 8 | ref[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user