[systemd-devel] [PATCH] journal-remote: initialize writer hashmap before use

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Thu Sep 25 15:20:02 PDT 2014


Applied, with a small change.

Zbyszek

On Wed, Sep 24, 2014 at 11:59:06PM +1000, Jonathan Liu wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=83682
> ---
>  src/journal-remote/journal-remote.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
> index f06c2cb..b1cc6fd 100644
> --- a/src/journal-remote/journal-remote.c
> +++ b/src/journal-remote/journal-remote.c
> @@ -913,6 +913,10 @@ static int remoteserver_init(RemoteServer *s,
>                          return r;
>          }
>  
> +        r = init_writer_hashmap(s);
> +        if (r < 0)
> +                return r;
> +
>          STRV_FOREACH(file, arg_files) {
>                  const char *output_name;
>  
> @@ -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
> -- 
> 2.1.0
> 
> 


More information about the systemd-devel mailing list