Skip to content

Commit 7b5b5fe

Browse files
committed
Drop unused Manager member timeout
The timeout member is never read from. This also makes the call of sd_journal_reliable_fd(3) unnecessary.
1 parent 6f0863f commit 7b5b5fe

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

src/netlog/netlog-manager.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
#include "string-util.h"
1717
#include "util.h"
1818

19-
#define JOURNAL_SEND_POLL_TIMEOUT (10 * USEC_PER_SEC)
20-
2119
/* Default severity LOG_NOTICE */
2220
#define JOURNAL_DEFAULT_SEVERITY LOG_PRI(LOG_NOTICE)
2321

@@ -339,8 +337,6 @@ static void close_journal_input(Manager *m) {
339337
sd_journal_close(m->journal);
340338
m->journal = NULL;
341339
}
342-
343-
m->timeout = 0;
344340
}
345341

346342
static int manager_signal_event_handler(sd_event_source *event, const struct signalfd_siginfo *si, void *userdata) {
@@ -392,13 +388,6 @@ static int manager_journal_monitor_listen(Manager *m) {
392388

393389
events = sd_journal_get_events(m->journal);
394390

395-
r = sd_journal_reliable_fd(m->journal);
396-
assert(r >= 0);
397-
if (r > 0)
398-
m->timeout = -1;
399-
else
400-
m->timeout = JOURNAL_SEND_POLL_TIMEOUT;
401-
402391
r = sd_event_add_io(m->event, &m->event_journal_input, m->journal_watch_fd,
403392
events, manager_journal_event_handler, m);
404393
if (r < 0)

src/netlog/netlog-manager.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ struct Manager {
3636
sd_event *event;
3737

3838
sd_event_source *event_journal_input;
39-
uint64_t timeout;
4039
usec_t retry_interval;
4140
usec_t connection_retry_usec;
4241

0 commit comments

Comments
 (0)