diff --git a/src/modules/db_redis/db_redis_mod.c b/src/modules/db_redis/db_redis_mod.c index 026abeb1485..89da2320839 100644 --- a/src/modules/db_redis/db_redis_mod.c +++ b/src/modules/db_redis/db_redis_mod.c @@ -31,9 +31,9 @@ #ifdef WITH_SSL int db_redis_opt_tls = 0; -char *ca_path = 0; +char *db_redis_ca_path = 0; #endif -char *db_pass = 0; +char *db_redis_db_pass = 0; MODULE_VERSION @@ -60,9 +60,9 @@ static param_export_t params[] = { {"verbosity", PARAM_INT, &db_redis_verbosity}, #ifdef WITH_SSL {"opt_tls", PARAM_INT, &db_redis_opt_tls}, - {"ca_path", PARAM_STRING, &ca_path}, + {"ca_path", PARAM_STRING, &db_redis_ca_path}, #endif - {"db_pass", PARAM_STRING, &db_pass}, {0, 0, 0}}; + {"db_pass", PARAM_STRING, &db_redis_db_pass}, {0, 0, 0}}; struct module_exports exports = { diff --git a/src/modules/db_redis/redis_connection.c b/src/modules/db_redis/redis_connection.c index f38b6698d41..0bf001d1528 100644 --- a/src/modules/db_redis/redis_connection.c +++ b/src/modules/db_redis/redis_connection.c @@ -37,9 +37,9 @@ static unsigned int MAX_URL_LENGTH = 1023; extern int db_redis_verbosity; #ifdef WITH_SSL extern int db_redis_opt_tls; -extern char *ca_path; +extern char *db_redis_ca_path; #endif -extern char *db_pass; +extern char *db_redis_db_pass; static void print_query(redis_key_t *query) { @@ -164,7 +164,7 @@ int db_redis_connect(km_redis_con_t *con) if(db_redis_opt_tls != 0) { /* Create SSL context*/ redisInitOpenSSL(); - ssl = redisCreateSSLContext(NULL, ca_path, NULL, NULL, NULL, NULL); + ssl = redisCreateSSLContext(NULL, db_redis_ca_path, NULL, NULL, NULL, NULL); if(ssl == NULL) { LM_ERR("Unable to create Redis SSL Context.\n"); goto err; @@ -208,7 +208,7 @@ int db_redis_connect(km_redis_con_t *con) if(db_redis_opt_tls != 0) { /* Create SSL context*/ redisInitOpenSSL(); - ssl = redisCreateSSLContext(NULL, ca_path, NULL, NULL, NULL, NULL); + ssl = redisCreateSSLContext(NULL, db_redis_ca_path, NULL, NULL, NULL, NULL); if(ssl == NULL) { LM_ERR("Unable to create Redis SSL Context.\n"); goto err; @@ -236,7 +236,7 @@ int db_redis_connect(km_redis_con_t *con) password = con->id->password; if(!password) { - password = db_pass; + password = db_redis_db_pass; } if(password) { reply = redisCommand(con->con, "AUTH %s", password);