Module: kamailio
Branch: master
Commit: c6feb52c97bbd3fc33dc837d2b23e56c75f09583
URL: 
https://github.com/kamailio/kamailio/commit/c6feb52c97bbd3fc33dc837d2b23e56c75f09583

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2023-11-21T15:39:21+01:00

app_lua: reformat exports structures

---

Modified: src/modules/app_lua/app_lua_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/c6feb52c97bbd3fc33dc837d2b23e56c75f09583.diff
Patch: 
https://github.com/kamailio/kamailio/commit/c6feb52c97bbd3fc33dc837d2b23e56c75f09583.patch

---

diff --git a/src/modules/app_lua/app_lua_mod.c 
b/src/modules/app_lua/app_lua_mod.c
index 5a554f03aba..1aa4579d489 100644
--- a/src/modules/app_lua/app_lua_mod.c
+++ b/src/modules/app_lua/app_lua_mod.c
@@ -62,39 +62,47 @@ int app_lua_reload_param(modparam_t type, void *val);
 
 int _ksr_app_lua_log_mode = 0;
 
+/* clang-format off */
 static param_export_t params[] = {
-               {"load", PARAM_STRING | USE_FUNC_PARAM, (void 
*)app_lua_load_param},
-               {"reload", INT_PARAM | USE_FUNC_PARAM, (void 
*)app_lua_reload_param},
-               {"log_mode", PARAM_INT, &_ksr_app_lua_log_mode}, {0, 0, 0}};
-
-static cmd_export_t cmds[] = {{"lua_dostring", 
(cmd_function)w_app_lua_dostring,
-                                                                         1, 
fixup_spve_null, 0, ANY_ROUTE},
-               {"lua_dofile", (cmd_function)w_app_lua_dofile, 1, 
fixup_spve_null, 0,
-                               ANY_ROUTE},
-               {"lua_runstring", (cmd_function)w_app_lua_runstring, 1, 
fixup_spve_null,
-                               0, ANY_ROUTE},
-               {"lua_run", (cmd_function)w_app_lua_run0, 1, fixup_lua_run, 0,
-                               ANY_ROUTE},
-               {"lua_run", (cmd_function)w_app_lua_run1, 2, fixup_lua_run, 0,
-                               ANY_ROUTE},
-               {"lua_run", (cmd_function)w_app_lua_run2, 3, fixup_lua_run, 0,
-                               ANY_ROUTE},
-               {"lua_run", (cmd_function)w_app_lua_run3, 4, fixup_lua_run, 0,
-                               ANY_ROUTE},
-               {"bind_app_lua", (cmd_function)bind_app_lua, 0, 0, 0, 
ANY_ROUTE},
-               {0, 0, 0, 0, 0, 0}};
+       {"load", PARAM_STRING | USE_FUNC_PARAM, (void *)app_lua_load_param},
+       {"reload", INT_PARAM | USE_FUNC_PARAM, (void *)app_lua_reload_param},
+       {"log_mode", PARAM_INT, &_ksr_app_lua_log_mode},
+       {0, 0, 0}
+};
+
+static cmd_export_t cmds[] = {
+       {"lua_dostring", (cmd_function)w_app_lua_dostring, 1,
+               fixup_spve_null, 0, ANY_ROUTE},
+       {"lua_dofile", (cmd_function)w_app_lua_dofile, 1,
+               fixup_spve_null, 0, ANY_ROUTE},
+       {"lua_runstring", (cmd_function)w_app_lua_runstring, 1,
+               fixup_spve_null, 0, ANY_ROUTE},
+       {"lua_run", (cmd_function)w_app_lua_run0, 1,
+               fixup_lua_run, 0, ANY_ROUTE},
+       {"lua_run", (cmd_function)w_app_lua_run1, 2,
+               fixup_lua_run, 0, ANY_ROUTE},
+       {"lua_run", (cmd_function)w_app_lua_run2, 3,
+               fixup_lua_run, 0, ANY_ROUTE},
+       {"lua_run", (cmd_function)w_app_lua_run3, 4,
+               fixup_lua_run, 0, ANY_ROUTE},
+       {"bind_app_lua", (cmd_function)bind_app_lua, 0,
+               0, 0, ANY_ROUTE},
+       {0, 0, 0, 0, 0, 0}
+};
 
 struct module_exports exports = {
-               "app_lua", DEFAULT_DLFLAGS, /* dlopen flags */
-               cmds,                                           
/*??exported??functions??*/
-               params,                                         
/*??exported??params??*/
-               0,                                                      
/*??exported??RPC??methods??*/
-               0,                                                      /* 
exported pseudo-variables */
-               0,                                                      
/*??response??function??*/
-               mod_init,                                       /* 
initialization module*/
-               child_init,                                     /* per child 
init function */
-               mod_destroy                                     /* destroy 
function */
+       "app_lua",                                      /* module name */
+       DEFAULT_DLFLAGS,                        /* dlopen flags */
+       cmds,                                           /* exported functions */
+       params,                                         /* exported params */
+       0,                                                      /* exported RPC 
methods */
+       0,                                                      /* exported 
pseudo-variables */
+       0,                                                      /* response 
function */
+       mod_init,                                       /* initialization 
module */
+       child_init,                                     /* per child init 
function */
+       mod_destroy                                     /* destroy function */
 };
+/* clang-format on */
 
 /**
  *

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to [email protected]

Reply via email to