Skip to content

Commit f307cb2

Browse files
committed
Default init socket address
1 parent ad0495a commit f307cb2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/netlog/netlog-manager.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ static int process_journal_input(Manager *m) {
215215
assert(m);
216216
assert(m->journal);
217217

218-
while (true) {
218+
for (;;) {
219219
r = sd_journal_next(m->journal);
220220
if (r < 0) {
221221
log_error_errno(r, "Failed to get next entry: %m");
@@ -342,8 +342,7 @@ static int manager_journal_monitor_listen(Manager *m) {
342342
if (m->last_cursor) {
343343
r = sd_journal_seek_cursor(m->journal, m->last_cursor);
344344
if (r < 0)
345-
return log_error_errno(r, "Failed to seek to cursor %s: %m",
346-
m->last_cursor);
345+
return log_error_errno(r, "Failed to seek to cursor %s: %m", m->last_cursor);
347346
}
348347

349348
return 0;
@@ -473,10 +472,15 @@ int manager_new(const char *state_file, const char *cursor, Manager **ret) {
473472
.log_format = SYSLOG_TRANSMISSION_LOG_FORMAT_RFC_5424,
474473
};
475474

475+
socket_address_parse(&m->address, "239.0.0.1:6000");
476+
477+
if (!m->state_file)
478+
return log_oom();
479+
476480
if (cursor) {
477481
m->last_cursor = strdup(cursor);
478482
if (!m->last_cursor)
479-
return -ENOMEM;
483+
return log_oom();
480484
}
481485

482486
r = sd_event_default(&m->event);

0 commit comments

Comments
 (0)