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

Author: Victor Seva <linuxman...@torreviejawireless.org>
Committer: Victor Seva <linuxman...@torreviejawireless.org>
Date: 2025-02-19T19:22:52+01:00

db_cfg: avoid local variable hides global variable

---

Modified: src/modules/cfg_db/cfg_db.c

---

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

---

diff --git a/src/modules/cfg_db/cfg_db.c b/src/modules/cfg_db/cfg_db.c
index 840417da7f7..d307d0e6963 100644
--- a/src/modules/cfg_db/cfg_db.c
+++ b/src/modules/cfg_db/cfg_db.c
@@ -405,30 +405,35 @@ static int mod_init(void)
        return 0;
 }
 
+/* clang-format off */
 /*
  * Exported parameters
  */
-static param_export_t params[] = {{"db_url", PARAM_STRING, &db_url},
-               {"transl_tbl", PARAM_STRING, &transl_tbl},
-               /*      {"transl_group_name_fld", PARAM_STRING, 
&transl_group_name_fld},
+static param_export_t mod_params[] = {
+       {"db_url", PARAM_STRING, &db_url},
+       {"transl_tbl", PARAM_STRING, &transl_tbl},
+/*
+       {"transl_group_name_fld", PARAM_STRING, &transl_group_name_fld},
        {"transl_cfg_table_fld", PARAM_STRING, &transl_cfg_table_fld},
        {"transl_cfg_table_group_name_field_fld", PARAM_STRING, 
&transl_cfg_table_group_name_field_fld},
        {"transl_cfg_table_name_field_fld", PARAM_STRING, 
&transl_cfg_table_name_field_fld},
        {"transl_cfg_table_value_field_fld", PARAM_STRING, 
&transl_cfg_table_value_field_fld},
 */
-               {"custom_tbl", PARAM_STRING, &custom_tbl},
-
-               {0, 0, 0}};
+       {"custom_tbl", PARAM_STRING, &custom_tbl},
+       {0, 0, 0}
+};
 
 /* Module interface */
 struct module_exports exports = {
-               MODULE_NAME, DEFAULT_DLFLAGS, /* dlopen flags */
-               0,                                                        /* 
Exported functions */
-               params,                                           /* Exported 
parameters */
-               0,                                                        /* 
RPC methods */
-               0,                                                        /* 
exported pseudo-variables */
-               0,                                                        /* 
response function */
-               mod_init,                                         /* module 
initialization function */
-               0,                                                        /* 
child initialization function */
-               0                                                         /* 
destroy function */
+       MODULE_NAME,
+       DEFAULT_DLFLAGS, /* dlopen flags */
+       0,               /* Exported functions */
+       mod_params,      /* Exported parameters */
+       0,               /* RPC methods */
+       0,               /* exported pseudo-variables */
+       0,               /* response function */
+       mod_init,        /* module initialization function */
+       0,               /* child initialization function */
+       0                /* destroy function */
 };
+/* clang-format on */

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to