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

Author: Victor Seva <linuxman...@torreviejawireless.org>
Committer: Victor Seva <linuxman...@torreviejawireless.org>
Date: 2023-11-08T20:53:53+01:00

dialplan: reformat exported structures more human friendly

revert to the format it had before 01d0d1de2c8

---

Modified: src/modules/dialplan/dialplan.c

---

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

---

diff --git a/src/modules/dialplan/dialplan.c b/src/modules/dialplan/dialplan.c
index 235158513f9..43aa6cd5a1b 100644
--- a/src/modules/dialplan/dialplan.c
+++ b/src/modules/dialplan/dialplan.c
@@ -96,47 +96,53 @@ int dp_append_branch = 1;
 int dp_reload_delta = 5;
 
 static time_t *dp_rpc_reload_time = NULL;
+/* clang-format off */
+static param_export_t mod_params[]={
+       { "db_url",                     PARAM_STR,      &dp_db_url },
+       { "table_name",         PARAM_STR,      &dp_table_name },
+       { "dpid_col",           PARAM_STR,      &dpid_column },
+       { "pr_col",                     PARAM_STR,      &pr_column },
+       { "match_op_col",       PARAM_STR,      &match_op_column },
+       { "match_exp_col",      PARAM_STR,      &match_exp_column },
+       { "match_len_col",      PARAM_STR,      &match_len_column },
+       { "subst_exp_col",      PARAM_STR,      &subst_exp_column },
+       { "repl_exp_col",       PARAM_STR,      &repl_exp_column },
+       { "attrs_col",          PARAM_STR,      &attrs_column },
+       { "attrs_pvar",     PARAM_STR,  &dp_attr_pvar_s },
+       { "fetch_rows",         PARAM_INT,      &dp_fetch_rows },
+       { "match_dynamic",      PARAM_INT,      &dp_match_dynamic },
+       { "append_branch",      PARAM_INT,      &dp_append_branch },
+       { "reload_delta",       PARAM_INT,      &dp_reload_delta },
+       {0,0,0}
+};
 
-static param_export_t mod_params[] = {{"db_url", PARAM_STR, &dp_db_url},
-               {"table_name", PARAM_STR, &dp_table_name},
-               {"dpid_col", PARAM_STR, &dpid_column},
-               {"pr_col", PARAM_STR, &pr_column},
-               {"match_op_col", PARAM_STR, &match_op_column},
-               {"match_exp_col", PARAM_STR, &match_exp_column},
-               {"match_len_col", PARAM_STR, &match_len_column},
-               {"subst_exp_col", PARAM_STR, &subst_exp_column},
-               {"repl_exp_col", PARAM_STR, &repl_exp_column},
-               {"attrs_col", PARAM_STR, &attrs_column},
-               {"attrs_pvar", PARAM_STR, &dp_attr_pvar_s},
-               {"fetch_rows", PARAM_INT, &dp_fetch_rows},
-               {"match_dynamic", PARAM_INT, &dp_match_dynamic},
-               {"append_branch", PARAM_INT, &dp_append_branch},
-               {"reload_delta", PARAM_INT, &dp_reload_delta}, {0, 0, 0}};
-
-static cmd_export_t cmds[] = {{"dp_translate", (cmd_function)dp_translate_f, 2,
-                                                                         
dp_trans_fixup, 0, ANY_ROUTE},
-               {"dp_translate", (cmd_function)dp_translate_f, 1, 
dp_trans_fixup, 0,
-                               ANY_ROUTE},
-               {"dp_reload", (cmd_function)dp_reload_f, 0, 0, 0, ANY_ROUTE},
-               {"dp_match", (cmd_function)w_dp_match, 2, fixup_igp_spve,
-                               fixup_free_igp_spve, ANY_ROUTE},
-               {"dp_replace", (cmd_function)w_dp_replace, 3, dp_replace_fixup,
-                               dp_replace_fixup_free, ANY_ROUTE},
-               {0, 0, 0, 0, 0, 0}};
-
-struct module_exports exports = {
-               "dialplan",              /* module's name */
-               DEFAULT_DLFLAGS, /* dlopen flags */
-               cmds,                    /* exported functions */
-               mod_params,              /* param exports */
-               0,                               /* exported RPC functions */
-               0,                               /* exported pseudo-variables */
-               0,                               /* reply processing function */
-               mod_init,                /* module initialization function */
-               child_init,              /* per-child init function */
-               mod_destroy              /* module destroy function */
+static cmd_export_t cmds[]={
+       {"dp_translate",(cmd_function)dp_translate_f,   2,      dp_trans_fixup, 
 0,
+               ANY_ROUTE},
+       {"dp_translate",(cmd_function)dp_translate_f,   1,      dp_trans_fixup, 
 0,
+               ANY_ROUTE},
+       {"dp_reload",(cmd_function)dp_reload_f, 0, 0,  0,
+               ANY_ROUTE},
+       {"dp_match",(cmd_function)w_dp_match,   2,      fixup_igp_spve,
+               fixup_free_igp_spve, ANY_ROUTE},
+       {"dp_replace",(cmd_function)w_dp_replace,       3,      
dp_replace_fixup,
+               dp_replace_fixup_free, ANY_ROUTE},
+       {0,0,0,0,0,0}
 };
 
+struct module_exports exports= {
+       "dialplan",      /* module's name */
+       DEFAULT_DLFLAGS, /* dlopen flags */
+       cmds,            /* exported functions */
+       mod_params,      /* param exports */
+       0,               /* exported RPC functions */
+       0,               /* exported pseudo-variables */
+       0,               /* reply processing function */
+       mod_init,        /* module initialization function */
+       child_init,      /* per-child init function */
+       mod_destroy      /* module destroy function */
+};
+/* clang-format on */
 
 static int mod_init(void)
 {

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to