Module: kamailio
Branch: master
Commit: ec45e952e453ae8f6b5a6598622f50d57e4470ef
URL:
https://github.com/kamailio/kamailio/commit/ec45e952e453ae8f6b5a6598622f50d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-22T12:50:09+02:00
domain: renamed local db_url variable to d_db_url
- it is exported as extern and can conflict with other variables with
same name
---
Modified: modules/domain/domain.c
Modified: modules/domain/domain_mod.c
Modified: modules/domain/domain_mod.h
---
Diff:
https://github.com/kamailio/kamailio/commit/ec45e952e453ae8f6b5a6598622f50d…
Patch:
https://github.com/kamailio/kamailio/commit/ec45e952e453ae8f6b5a6598622f50d…
---
diff --git a/modules/domain/domain.c b/modules/domain/domain.c
index 65b6aed..33ff994 100644
--- a/modules/domain/domain.c
+++ b/modules/domain/domain.c
@@ -314,7 +314,7 @@ int reload_tables ( void )
cols[2] = &type_col;
cols[3] = &value_col;
- if (domain_db_init(&db_url) < 0) {
+ if (domain_db_init(&d_db_url) < 0) {
LM_ERR("unable to open database connection\n");
return -1;
}
diff --git a/modules/domain/domain_mod.c b/modules/domain/domain_mod.c
index 81f3091..2f204d1 100644
--- a/modules/domain/domain_mod.c
+++ b/modules/domain/domain_mod.c
@@ -68,7 +68,7 @@ static int domain_init_rpc(void);
/*
* Module parameter variables
*/
-str db_url = str_init(DEFAULT_RODB_URL);
+str d_db_url = str_init(DEFAULT_RODB_URL);
str domain_table = str_init(DOMAIN_TABLE); /* Name of domain table */
str domain_attrs_table = str_init(DOMAIN_ATTRS_TABLE);
str did_col = str_init(DID_COL); /* Name of domain id column */
@@ -112,7 +112,7 @@ static cmd_export_t cmds[] = {
* Exported parameters
*/
static param_export_t params[] = {
- {"db_url", PARAM_STR, &db_url },
+ {"db_url", PARAM_STR, &d_db_url },
{"domain_table", PARAM_STR, &domain_table},
{"domain_attrs_table", PARAM_STR, &domain_attrs_table},
{"did_col", PARAM_STR, &did_col },
@@ -175,14 +175,14 @@ static int mod_init(void)
}
/* Bind database */
- if (domain_db_bind(&db_url)) {
- LM_DBG("Usign db_url [%.*s]\n", db_url.len, db_url.s);
+ if (domain_db_bind(&d_db_url)) {
+ LM_DBG("Usign db_url [%.*s]\n", d_db_url.len, d_db_url.s);
LM_ERR("no database module found. Have you configure thed \"db_url\"
modparam properly?\n");
return -1;
}
/* Check table versions */
- if (domain_db_init(&db_url) < 0) {
+ if (domain_db_init(&d_db_url) < 0) {
LM_ERR("unable to open database connection\n");
return -1;
}
diff --git a/modules/domain/domain_mod.h b/modules/domain/domain_mod.h
index 4f7a9a9..4975b7e 100644
--- a/modules/domain/domain_mod.h
+++ b/modules/domain/domain_mod.h
@@ -69,7 +69,7 @@ typedef struct param_source {
/*
* Module parameters variables
*/
-extern str db_url;
+extern str d_db_url;
extern str domain_table; /* Domain table name */
extern str domain_attrs_table; /* Domain attributes table name */
extern str did_col; /* Domain id column name */