]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix calling for peak functions
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 12 May 2017 15:45:01 +0000 (16:45 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 12 May 2017 15:45:01 +0000 (16:45 +0100)
src/libserver/symbols_cache.c

index 51addf04f0a41dbf680397217c61e597ab4803d1..8df440d1c61ba2973c1d3bbcd3bd96a0d0ee54d8 100644 (file)
@@ -1918,7 +1918,7 @@ rspamd_symbols_cache_call_peak_cb (struct event_base *ev_base,
        lua_State *L = cache->cfg->lua_state;
        struct event_base **pbase;
 
-       lua_pushvalue (L, cache->peak_cb);
+       lua_rawgeti (L, LUA_REGISTRYINDEX, cache->peak_cb);
        pbase = lua_newuserdata (L, sizeof (*pbase));
        *pbase = ev_base;
        rspamd_lua_setclass (L, "rspamd{ev_base}", -1);