]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Store map pointer in a backend structure
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 12 Feb 2022 13:02:59 +0000 (13:02 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 12 Feb 2022 13:03:57 +0000 (13:03 +0000)
src/libserver/maps/map.c
src/libserver/maps/map_private.h

index fae277bcd84885c996ceecdee89672eb236c9dfb..6348ca8b2d922a5f4bb0c92508905ff9d3b53d9c 100644 (file)
@@ -2802,6 +2802,7 @@ rspamd_map_add (struct rspamd_config *cfg,
 
        rspamd_map_calculate_hash (map);
        msg_info_map ("added map %s", bk->uri);
+       bk->map = map;
 
        cfg->maps = g_list_prepend (cfg->maps, map);
 
@@ -2842,6 +2843,8 @@ rspamd_map_add_backend (struct rspamd_map *map, struct rspamd_map_backend *bk)
        else {
                g_ptr_array_add (map->backends, bk);
        }
+
+       bk->map = map;
 }
 
 struct rspamd_map*
index 37def8c18083bb8a51ff8a35c5de3767d1b54392..4c0805e3ad19af9d29cc2bc5e80e5fd8aad533f9 100644 (file)
@@ -115,11 +115,14 @@ union rspamd_map_backend_data {
        struct static_map_data *sd;
 };
 
+
+struct rspamd_map;
 struct rspamd_map_backend {
        enum fetch_proto protocol;
        gboolean is_signed;
        gboolean is_compressed;
        gboolean is_fallback;
+       struct rspamd_map *map;
        struct ev_loop *event_loop;
        guint32 id;
        struct rspamd_cryptobox_pubkey *trusted_pubkey;