]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
stats: client_http_init() - Add stats_settings parameter
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 20 Apr 2020 08:53:00 +0000 (11:53 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 20 Apr 2020 08:53:54 +0000 (11:53 +0300)
src/stats/client-http.c
src/stats/client-http.h
src/stats/main.c

index f6b6b77598987acacb4275a2b1a510c8628dc0a3..b39c8caae574993dc78d2db1320f42991b35e1d9 100644 (file)
@@ -215,10 +215,10 @@ stats_http_resource_root_request(void *context ATTR_UNUSED,
  * Server
  */
 
-void client_http_init(void)
+void client_http_init(const struct stats_settings *set)
 {
        struct http_server_settings http_set = {
-               .rawlog_dir = stats_settings->stats_http_rawlog_dir,
+               .rawlog_dir = set->stats_http_rawlog_dir,
        };
 
        i_array_init(&stats_http_resources, 8);
index ecbe51528a2927b34d7193116a9345165a4379f4..4251ce33ed793aa8433b13cbb3b8b03c4ffeefcc 100644 (file)
@@ -22,7 +22,7 @@ void stats_http_resource_add(const char *path, const char *title,
                        typeof(context), struct http_server_request *req, \
                        const char *sub_path))))
 
-void client_http_init(void);
+void client_http_init(const struct stats_settings *set);
 void client_http_deinit(void);
 
 #endif
index 1c74f0106a350a0616ffda5ae20dd97860b347fa..4ebfbe4bd0491c7cb54d1379567b174732856ade 100644 (file)
@@ -68,7 +68,7 @@ static void main_init(void)
        stats_event_categories_init();
        client_readers_init();
        client_writers_init();
-       client_http_init();
+       client_http_init(stats_settings);
        stats_services_init();
 }