Hello,
I've discovered a copy-and-paste error in the app_lua module where it checks that modules are loaded for the registrar functions. This bug is visible if the registrar module is exported but the maxfwd module is not.

Patch is attached.

Regards,
Hugh

--
--
Hugh Waite
Senior Design Engineer
Crocodile RCS Ltd.

--- a/app_lua_exp.c     2011-08-31 15:12:41.000000000 +0100
+++ b/app_lua_exp.c     2011-08-31 15:15:37.000000000 +0100
@@ -1026,9 +1026,9 @@
        flags = 0;
        env_L = sr_lua_env_get();
 
-       if(!(_sr_lua_exp_reg_mods&SR_LUA_EXP_MOD_MAXFWD))
+       if(!(_sr_lua_exp_reg_mods&SR_LUA_EXP_MOD_REGISTRAR))
        {
-               LM_WARN("weird: maxfwd function executed but module not 
registered\n");
+               LM_WARN("weird: registrar function executed but module not 
registered\n");
                return app_lua_return_error(L);
        }
        if(env_L->msg==NULL)
@@ -1067,9 +1067,9 @@
 
        env_L = sr_lua_env_get();
 
-       if(!(_sr_lua_exp_reg_mods&SR_LUA_EXP_MOD_MAXFWD))
+       if(!(_sr_lua_exp_reg_mods&SR_LUA_EXP_MOD_REGISTRAR))
        {
-               LM_WARN("weird: maxfwd function executed but module not 
registered\n");
+               LM_WARN("weird: registrar function executed but module not 
registered\n");
                return app_lua_return_error(L);
        }
        if(env_L->msg==NULL)
_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to