]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lua: dlua-dovecot-http - Default to script event if script provides no event...
authorStephan Bosch <stephan.bosch@open-xchange.com>
Sat, 25 Nov 2023 16:06:37 +0000 (17:06 +0100)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Fri, 23 Feb 2024 11:19:26 +0000 (12:19 +0100)
src/lib-lua/dlua-dovecot-http.c

index 53bfffcf8dbe259b414a716987a9901cec8962ae..55590371c05df75f1124764cdf38f593d0967b5e 100644 (file)
@@ -475,6 +475,10 @@ static int parse_client_settings(lua_State *L, struct http_client_settings *set,
        lua_getfield(L, -1, "event_parent");
        if (!lua_isnil(L, -1))
                set->event_parent = dlua_check_event(L, -1);
+       else {
+               struct dlua_script *script = dlua_script_from_state(L);
+               set->event_parent = script->event;
+       }
 
        return 0;
 }