From: Vsevolod Stakhov Date: Mon, 24 Mar 2025 15:17:09 +0000 (+0000) Subject: [Minor] Set loaded flag when we load map from cache X-Git-Tag: 3.12.0~53^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5386%2Fhead;p=thirdparty%2Frspamd.git [Minor] Set loaded flag when we load map from cache --- diff --git a/src/libserver/maps/map.c b/src/libserver/maps/map.c index 7a8bcfb7ff..76d639a697 100644 --- a/src/libserver/maps/map.c +++ b/src/libserver/maps/map.c @@ -426,6 +426,7 @@ http_map_finish(struct rspamd_http_connection *conn, */ g_atomic_int_set(&data->cache->available, 1); g_atomic_int_set(&map->shared->loaded, 1); + g_atomic_int_set(&map->shared->cached, 0); /* Store cached data */ rspamd_strlcpy(data->cache->shmem_name, cbd->shmem_data->shm_name, sizeof(data->cache->shmem_name)); @@ -1735,6 +1736,8 @@ rspamd_map_read_http_cached_file(struct rspamd_map *map, struct tm tm; char ncheck_buf[32], lm_buf[32]; + g_atomic_int_set(&map->shared->loaded, 1); + g_atomic_int_set(&map->shared->cached, 1); rspamd_localtime(map->next_check, &tm); strftime(ncheck_buf, sizeof(ncheck_buf) - 1, "%Y-%m-%d %H:%M:%S", &tm); rspamd_localtime(htdata->last_modified, &tm);