]> source.dussan.org Git - rspamd.git/commitdiff
Try to load all lua modules ignoring failed ones.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 13 May 2015 09:53:28 +0000 (10:53 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 13 May 2015 09:53:28 +0000 (10:53 +0100)
src/lua/lua_common.c

index 125acfaf00ba7cca0441a30a163fb50bbfb6278b..59071734605c3835e2c424ddc4d1cc7cc2f4236f 100644 (file)
@@ -291,7 +291,7 @@ rspamd_init_lua_filters (struct rspamd_config *cfg)
                                msg_info ("load of %s failed: %s", module->path,
                                        lua_tostring (L, -1));
                                cur = g_list_next (cur);
-                               return FALSE;
+                               continue;
                        }
 
                        /* Initialize config structure */
@@ -304,14 +304,14 @@ rspamd_init_lua_filters (struct rspamd_config *cfg)
                        if (lua_pcall (L, 0, LUA_MULTRET, 0) != 0) {
                                msg_info ("init of %s failed: %s", module->path,
                                        lua_tostring (L, -1));
-                               return FALSE;
+                               cur = g_list_next (cur);
+                               continue;
                        }
                        if (lua_gettop (L) != 0) {
                                if (lua_tonumber (L, -1) == -1) {
                                        msg_info (
                                                "%s returned -1 that indicates configuration error",
                                                module->path);
-                                       return FALSE;
                                }
                                lua_pop (L, lua_gettop (L));
                        }