diff options
author | Jonathan Liu <net147@gmail.com> | 2014-09-24 23:59:06 +1000 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-09-25 18:19:03 -0400 |
commit | 22259a00fdb54dee818eeb1019421e2c516a330d (patch) | |
tree | 2aaf9abd8dda8bfd5e77826664c8192dff480122 /src/journal-remote/journal-remote.c | |
parent | 79d80fc1466512d0ca211f4bfcd9de5f2f816a5a (diff) |
journal-remote: initialize writer hashmap before use
https://bugs.freedesktop.org/show_bug.cgi?id=83682
[zj: move the initalization even earlier, before any sockets are
looked at.]
Diffstat (limited to 'src/journal-remote/journal-remote.c')
-rw-r--r-- | src/journal-remote/journal-remote.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c index f06c2cb249..ad87783510 100644 --- a/src/journal-remote/journal-remote.c +++ b/src/journal-remote/journal-remote.c @@ -819,6 +819,10 @@ static int remoteserver_init(RemoteServer *s, assert(server == NULL); server = s; + r = init_writer_hashmap(s); + if (r < 0) + return r; + n = sd_listen_fds(true); if (n < 0) { log_error("Failed to read listening file descriptors from environment: %s", @@ -942,10 +946,6 @@ static int remoteserver_init(RemoteServer *s, return -EINVAL; } - r = init_writer_hashmap(s); - if (r < 0) - return r; - if (arg_split_mode == JOURNAL_WRITE_SPLIT_NONE) { /* In this case we know what the writer will be called, so we can create it and verify that we can |