]> source.dussan.org Git - rspamd.git/commit
[Feature] Allow async events to be registered from LUA rules
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 21 Apr 2017 09:37:13 +0000 (10:37 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 21 Apr 2017 09:37:13 +0000 (10:37 +0100)
commit79476cf36afe99b196502a109c85434b59ad5fd7
tree5bdbdac37ec154c9ad9b7dec6c4821d90812e171
parent0bbc551746605e85adff961c9049a61e44fffd00
[Feature] Allow async events to be registered from LUA rules

Here is an example:

```lua

rspamd_config.ASYNC_RULE = {
  callback = function(task)
    local ret = false

    local function test1(task)
      local function test2(task)
        return ret
      end

      ret = true
      return test2
    end

    return test1
  end
}
```
src/lua/lua_config.c