]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Link runtime to the proper statfile context
authorVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 11 Dec 2023 14:38:20 +0000 (14:38 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 11 Dec 2023 14:38:20 +0000 (14:38 +0000)
src/libstat/backends/redis_backend.cxx

index 30dd131078523139359e3a1008394a98b55d610e..5e222c6cb0e3cf89bef2bd9b3db77e4df7b7f388 100644 (file)
@@ -603,9 +603,11 @@ rspamd_redis_runtime(struct rspamd_task *task,
                                                                                                                                                                        object_expanded, stcf->is_spam);
 
                if (maybe_existing) {
-                       /* Update stcf to correspond to what we have been asked */
-                       maybe_existing.value()->stcf = stcf;
-                       return maybe_existing.value();
+                       auto *rt = maybe_existing.value();
+                       /* Update stcf and ctx to correspond to what we have been asked */
+                       rt->stcf = stcf;
+                       rt->ctx = ctx;
+                       return rt;
                }
        }