USRP lib: fix incorrect config check for time_source fallback

Corrected a logic bug in usrp_lib.cpp where the code mistakenly checked
openair0_cfg[0].clock_source instead of time_source when a time_source
was already specified in usrp_args.

Also improved the warning log to clarify that the config value is being
ignored in favor of the explicit user-provided usrp_args.

Co-authored-by: Alexandre Serio <alexandre.j.serio@altice.pt>
This commit is contained in:
Guido Casati
2025-06-16 11:25:30 +02:00
co-authored by Alexandre Serio
parent 627e60f5bd
commit a41be56b2a
+3 -3
View File
@@ -1202,9 +1202,9 @@ extern "C" {
}
}
else {
if (openair0_cfg[0].clock_source != unset) {
LOG_W(HW,"Time source set in both usrp_args and in time_source, ingnoring the latter!\n");
}
if (openair0_cfg[0].time_source != unset) {
LOG_W(HW, "Time source set in both usrp_args and in openair0_cfg[0].time_source, ignoring the latter!\n");
}
}