@@ -276,10 +276,28 @@ int lua_sr_initialized(void)
*/
int app_lua_return_boolean(lua_State *L, int b)
{
- if(b==0)
- lua_pushboolean(L, 0);
+ if(b==SRLUA_FALSE)
+ lua_pushboolean(L, SRLUA_FALSE);
else
- lua_pushboolean(L, 1);
+ lua_pushboolean(L, SRLUA_TRUE);
+ return 1;
+}
+
+/**
+ *
+ */
+int app_lua_return_false(lua_State *L)
+{
+int app_lua_return_true(lua_State *L)
return 1;
}
@@ -55,7 +55,11 @@ int app_lua_runstring(struct sip_msg *msg, char *script);
int app_lua_run(struct sip_msg *msg, char *func, char *p1, char *p2,
char *p3);
+#define SRLUA_FALSE 0
+#define SRLUA_TRUE 1
int app_lua_return_boolean(lua_State *L, int b);
+int app_lua_return_false(lua_State *L);
+int app_lua_return_true(lua_State *L);
void app_lua_dump_stack(lua_State *L);