Use only 3 chars from refclock driver name in default refid

This commit is contained in:
Miroslav Lichvar 2010-11-30 18:08:33 +01:00
parent bed5b72cbe
commit e98080b8bb

View file

@ -208,7 +208,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, "%3s%d", params->driver_name, n_sources % 10); snprintf((char *)ref, 5, "%3.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];
} }