fix sources match (#16271)
Costa Tsaousis committed
Oct 25, 2023 at 12:15 UTC
a41bf577743b69ebce331e6a5655a8ebb5741f8b
1 file changed
+2
-2
collectors/systemd-journal.plugin/systemd-journal.c
+2
-2
@@ -1172,8 +1172,8 @@ static void journal_files_registry_update() {
1172
1173
static bool jf_is_mine(struct journal_file *jf, FUNCTION_QUERY_STATUS *fqs) {
1174
1175
- if((fqs->source_type == SDJF_NONE || (jf->source_type & fqs->source_type)) &&
1176
- (!fqs->sources || simple_pattern_matches(fqs->sources, string2str(jf->source)))) {
1175
+ if((fqs->source_type == SDJF_NONE && !fqs->sources) || (jf->source_type & fqs->source_type) ||
1176
+ (fqs->sources && simple_pattern_matches(fqs->sources, string2str(jf->source)))) {
1177
1178
usec_t anchor_delta = JOURNAL_VS_REALTIME_DELTA_MAX_UT;
1179
usec_t first_ut = jf->msg_first_ut;