mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 00:15:07 -05:00
sources: drop unreachable log message
With forced reselection during source removal selected_source_index can only be INVALID_SOURCE if there are no sources. The "Can't synchronise: no sources" message couldn't be logged even before that as SRC_ReselectSource() resets the index before calling SRC_SelectSource(). Replace the message with an assertion.
This commit is contained in:
@@ -854,11 +854,9 @@ SRC_SelectSource(SRC_Instance updated_inst)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (n_sources == 0) {
|
if (n_sources == 0) {
|
||||||
/* In this case, we clearly cannot synchronise to anything */
|
/* Removed sources are unselected before actual removal */
|
||||||
if (selected_source_index != INVALID_SOURCE) {
|
if (selected_source_index != INVALID_SOURCE)
|
||||||
log_selection_message(LOGS_INFO, "Can't synchronise: no sources", NULL);
|
assert(0);
|
||||||
selected_source_index = INVALID_SOURCE;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user