kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
June 2023
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
10 participants
308 discussions
Start a n
N
ew thread
git:master:d29d435c: ndb_redis: Makefile - updated find command for libhiredis_ssl
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: d29d435cad3ec52f4171035446870ad2fe991858 URL:
https://github.com/kamailio/kamailio/commit/d29d435cad3ec52f4171035446870ad…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2023-06-20T11:04:30+02:00 ndb_redis: Makefile - updated find command for libhiredis_ssl - silent warnings about not existing directories --- Modified: src/modules/ndb_redis/Makefile --- Diff:
https://github.com/kamailio/kamailio/commit/d29d435cad3ec52f4171035446870ad…
Patch:
https://github.com/kamailio/kamailio/commit/d29d435cad3ec52f4171035446870ad…
--- diff --git a/src/modules/ndb_redis/Makefile b/src/modules/ndb_redis/Makefile index 6b27f72386..ba085ca273 100644 --- a/src/modules/ndb_redis/Makefile +++ b/src/modules/ndb_redis/Makefile @@ -25,7 +25,7 @@ else HIREDISLIBSPATH = $(shell $(HIREDIS_BUILDER) --libs-only-L | cut -c 3-) ifeq ($(HIREDISLIBSPATH),) GCCSEARCHDIRS = $(shell $(CC) -print-search-dirs | grep -Po '^.*libraries: =.*' | cut -d "=" -f2- | tr : ' ') - ifneq ($(shell find $(GCCSEARCHDIRS) libhiredis_ssl.so),) + ifneq ($(shell find $(GCCSEARCHDIRS) -name libhiredis_ssl.so 2>/dev/null),) HIREDISDEFS += -DWITH_SSL HIREDISLIBS += -lhiredis_ssl endif
1 year, 6 months
1
0
0
0
git:master:d88d60a0: db_redis: Makefile - updated find command for libhiredis_ssl
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: d88d60a0f3d67f42e4201d6c871bbf993e6fa87b URL:
https://github.com/kamailio/kamailio/commit/d88d60a0f3d67f42e4201d6c871bbf9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2023-06-20T11:03:04+02:00 db_redis: Makefile - updated find command for libhiredis_ssl - silent warnings about not existing directories --- Modified: src/modules/db_redis/Makefile --- Diff:
https://github.com/kamailio/kamailio/commit/d88d60a0f3d67f42e4201d6c871bbf9…
Patch:
https://github.com/kamailio/kamailio/commit/d88d60a0f3d67f42e4201d6c871bbf9…
--- diff --git a/src/modules/db_redis/Makefile b/src/modules/db_redis/Makefile index f2231c26aec..815cd056b9d 100644 --- a/src/modules/db_redis/Makefile +++ b/src/modules/db_redis/Makefile @@ -31,7 +31,7 @@ else HIREDISLIBSPATH = $(shell $(HIREDIS_BUILDER) --libs-only-L | cut -c 3-) ifeq ($(HIREDISLIBSPATH),) GCCSEARCHDIRS = $(shell $(CC) -print-search-dirs | grep -Po '^.*libraries: =.*' | cut -d "=" -f2- | tr : ' ') - ifneq ($(shell find $(GCCSEARCHDIRS) libhiredis_ssl.so),) + ifneq ($(shell find $(GCCSEARCHDIRS) -name libhiredis_ssl.so 2>/dev/null),) HIREDISDEFS += -DWITH_SSL HIREDISLIBS += -lhiredis_ssl endif
1 year, 6 months
1
0
0
0
git:master:043f31ea: ndb_redis: Fixing format
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 043f31ea0314c5d1d60a6ce8ce81e626922223c4 URL:
https://github.com/kamailio/kamailio/commit/043f31ea0314c5d1d60a6ce8ce81e62…
Author: Joel Centelles <joel_centellesmartin(a)baxter.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2023-06-20T10:45:31+02:00 ndb_redis: Fixing format Fixing some spaces and indentations --- Modified: src/modules/ndb_redis/ndb_redis_mod.c Modified: src/modules/ndb_redis/redis_client.c --- Diff:
https://github.com/kamailio/kamailio/commit/043f31ea0314c5d1d60a6ce8ce81e62…
Patch:
https://github.com/kamailio/kamailio/commit/043f31ea0314c5d1d60a6ce8ce81e62…
--- diff --git a/src/modules/ndb_redis/ndb_redis_mod.c b/src/modules/ndb_redis/ndb_redis_mod.c index 48c04a0bcc..4d0491547d 100644 --- a/src/modules/ndb_redis/ndb_redis_mod.c +++ b/src/modules/ndb_redis/ndb_redis_mod.c @@ -134,7 +134,7 @@ static param_export_t params[] = { {"allowed_timeouts", INT_PARAM, &redis_allowed_timeouts_param}, {"flush_on_reconnect", INT_PARAM, &redis_flush_on_reconnect_param}, {"allow_dynamic_nodes", INT_PARAM, &redis_allow_dynamic_nodes_param}, - {"debug", PARAM_INT, &ndb_redis_debug}, + {"debug", PARAM_INT, &ndb_redis_debug}, #ifdef WITH_SSL {"ca_path", PARAM_STRING, &ndb_redis_ca_path}, #endif diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c index 39b33d2066..13701438f1 100644 --- a/src/modules/ndb_redis/redis_client.c +++ b/src/modules/ndb_redis/redis_client.c @@ -140,14 +140,14 @@ int redisc_init(void) pit->body.s); haspass = 1; #ifdef WITH_SSL - } else if(pit->name.len==3 - && strncmp(pit->name.s, "tls", 3) == 0) { + } else if(pit->name.len == 3 + && strncmp(pit->name.s, "tls", 3) == 0) { snprintf(pass, sizeof(pass) - 1, "%.*s", pit->body.len, pit->body.s); if(str2int(&pit->body, &enable_ssl) < 0) enable_ssl = 0; #endif - } else if(pit->name.len == 14 + } else if(pit->name.len == 14 && strncmp(pit->name.s, "sentinel_group", 14) == 0) { snprintf(sentinel_group, sizeof(sentinel_group) - 1, "%.*s", pit->body.len, pit->body.s); @@ -236,8 +236,8 @@ int redisc_init(void) if(enable_ssl) { /* Create SSL context*/ redisInitOpenSSL(); - rsrv->sslCtxRedis = - redisCreateSSLContext(NULL, ndb_redis_ca_path, NULL, NULL, NULL, NULL); + rsrv->sslCtxRedis = redisCreateSSLContext( + NULL, ndb_redis_ca_path, NULL, NULL, NULL, NULL); if(rsrv->sslCtxRedis == NULL) { LM_ERR("Unable to create Redis TLS Context.\n"); } @@ -251,8 +251,8 @@ int redisc_init(void) redisConnectUnixWithTimeout(unix_sock_path, tv_conn); } else { #ifdef WITH_SSL - LOG(ndb_redis_debug, "Connecting to %s %s:%d\n", - (enable_ssl) ?"TLS" :"UDP", addr, port); + LOG(ndb_redis_debug, "Connecting to %s %s:%d\n", + (enable_ssl) ? "TLS" : "UDP", addr, port); #else LOG(ndb_redis_debug, "Connecting to %s:%d\n", addr, port); #endif @@ -500,7 +500,7 @@ int redisc_reconnect_server(redisc_server_t *rsrv) #ifdef WITH_SSL } else if(pit->name.len == 3 && strncmp(pit->name.s, "tls", 3) == 0) { snprintf( - pass, sizeof(pass)-1, "%.*s", pit->body.len, pit->body.s); + pass, sizeof(pass) - 1, "%.*s", pit->body.len, pit->body.s); if(str2int(&pit->body, &enable_ssl) < 0) enable_ssl = 0; #endif @@ -598,8 +598,8 @@ int redisc_reconnect_server(redisc_server_t *rsrv) if(enable_ssl) { /* Create SSL context*/ redisInitOpenSSL(); - rsrv->sslCtxRedis = - redisCreateSSLContext(NULL, ndb_redis_ca_path, NULL, NULL, NULL, NULL); + rsrv->sslCtxRedis = redisCreateSSLContext( + NULL, ndb_redis_ca_path, NULL, NULL, NULL, NULL); if(rsrv->sslCtxRedis == NULL) { LM_ERR("Unable to create Redis TLS Context.\n"); }
1 year, 6 months
1
0
0
0
git:master:cb96de74: db_redis: Format fixes
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: cb96de742f1d729d01bf9c8c255a12aa089d6974 URL:
https://github.com/kamailio/kamailio/commit/cb96de742f1d729d01bf9c8c255a12a…
Author: Joel Centelles <joel_centellesmartin(a)baxter.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2023-06-20T10:45:31+02:00 db_redis: Format fixes Fixing some spaces --- Modified: src/modules/db_redis/redis_connection.c --- Diff:
https://github.com/kamailio/kamailio/commit/cb96de742f1d729d01bf9c8c255a12a…
Patch:
https://github.com/kamailio/kamailio/commit/cb96de742f1d729d01bf9c8c255a12a…
--- diff --git a/src/modules/db_redis/redis_connection.c b/src/modules/db_redis/redis_connection.c index 0bf001d1528..5a49346b431 100644 --- a/src/modules/db_redis/redis_connection.c +++ b/src/modules/db_redis/redis_connection.c @@ -150,7 +150,7 @@ int db_redis_connect(km_redis_con_t *con) char hosts[MAX_URL_LENGTH]; char *host_begin; char *host_end; - LM_DBG("connecting to redis cluster at %.*s\n", con->id->url.len, + LM_DBG("connecting to redis cluster at %.*s\n", con->id->url.len, con->id->url.s); host_begin = strstr(con->id->url.s, "redis://"); if(host_begin) { @@ -164,7 +164,8 @@ int db_redis_connect(km_redis_con_t *con) if(db_redis_opt_tls != 0) { /* Create SSL context*/ redisInitOpenSSL(); - ssl = redisCreateSSLContext(NULL, db_redis_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; @@ -197,7 +198,7 @@ int db_redis_connect(km_redis_con_t *con) #endif status = redisClusterConnect2(con->con); if(status != REDIS_OK) { - LM_ERR("cannot open connection to cluster with hosts: %s, error: %s\n", + LM_ERR("cannot open connection to cluster with hosts: %s, error: %s\n", hosts, con->con->errstr); goto err; } @@ -208,7 +209,8 @@ int db_redis_connect(km_redis_con_t *con) if(db_redis_opt_tls != 0) { /* Create SSL context*/ redisInitOpenSSL(); - ssl = redisCreateSSLContext(NULL, db_redis_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; @@ -218,7 +220,7 @@ int db_redis_connect(km_redis_con_t *con) con->con = redisConnectWithTimeout(con->id->host, con->id->port, tv); if(!con->con) { - LM_ERR("cannot open connection: %.*s\n", con->id->url.len, + LM_ERR("cannot open connection: %.*s\n", con->id->url.len, con->id->url.s); goto err; }
1 year, 6 months
1
0
0
0
git:master:d4192486: ndb_redis: Searching SSL support in gcc search library path
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: d41924862a1729de186a5d1f4adddcfeb7fb7b7d URL:
https://github.com/kamailio/kamailio/commit/d41924862a1729de186a5d1f4adddcf…
Author: Joel Centelles <joel_centellesmartin(a)baxter.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2023-06-20T10:45:31+02:00 ndb_redis: Searching SSL support in gcc search library path Checking libhiredis_ssl.so in gcc --print-search-dirs --- Modified: src/modules/ndb_redis/Makefile --- Diff:
https://github.com/kamailio/kamailio/commit/d41924862a1729de186a5d1f4adddcf…
Patch:
https://github.com/kamailio/kamailio/commit/d41924862a1729de186a5d1f4adddcf…
--- diff --git a/src/modules/ndb_redis/Makefile b/src/modules/ndb_redis/Makefile index a90e3018b4..6b27f72386 100644 --- a/src/modules/ndb_redis/Makefile +++ b/src/modules/ndb_redis/Makefile @@ -23,10 +23,18 @@ else HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags) HIREDISLIBS = $(shell $(HIREDIS_BUILDER) --libs) HIREDISLIBSPATH = $(shell $(HIREDIS_BUILDER) --libs-only-L | cut -c 3-) - ifneq ($(shell ls $(HIREDISLIBSPATH) | grep libhiredis_ssl.so),) - HIREDISDEFS += -DWITH_SSL - HIREDISLIBS += -lhiredis_ssl - endif + ifeq ($(HIREDISLIBSPATH),) + GCCSEARCHDIRS = $(shell $(CC) -print-search-dirs | grep -Po '^.*libraries: =.*' | cut -d "=" -f2- | tr : ' ') + ifneq ($(shell find $(GCCSEARCHDIRS) libhiredis_ssl.so),) + HIREDISDEFS += -DWITH_SSL + HIREDISLIBS += -lhiredis_ssl + endif + else + ifneq ($(shell ls $(HIREDISLIBSPATH) | grep libhiredis_ssl.so),) + HIREDISDEFS += -DWITH_SSL + HIREDISLIBS += -lhiredis_ssl + endif + endif ifeq (,$(findstring hiredis,$(HIREDISDEFS))) DEFS+=-DWITH_HIREDIS_PATH
1 year, 6 months
1
0
0
0
git:master:f7a712b3: db_redis: Searching SSL support in gcc search library path
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: f7a712b36918bd9c01256fb2b283754ad9ed7422 URL:
https://github.com/kamailio/kamailio/commit/f7a712b36918bd9c01256fb2b283754…
Author: Joel Centelles <joel_centellesmartin(a)baxter.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2023-06-20T10:45:31+02:00 db_redis: Searching SSL support in gcc search library path Checking libhiredis_ssl.so in gcc --print-search-dirs --- Modified: src/modules/db_redis/Makefile --- Diff:
https://github.com/kamailio/kamailio/commit/f7a712b36918bd9c01256fb2b283754…
Patch:
https://github.com/kamailio/kamailio/commit/f7a712b36918bd9c01256fb2b283754…
--- diff --git a/src/modules/db_redis/Makefile b/src/modules/db_redis/Makefile index 7d427586e98..f2231c26aec 100644 --- a/src/modules/db_redis/Makefile +++ b/src/modules/db_redis/Makefile @@ -29,10 +29,18 @@ else HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags) HIREDISLIBS = $(shell $(HIREDIS_BUILDER) --libs) HIREDISLIBSPATH = $(shell $(HIREDIS_BUILDER) --libs-only-L | cut -c 3-) - ifneq ($(shell ls $(HIREDISLIBSPATH) | grep libhiredis_ssl.so),) + ifeq ($(HIREDISLIBSPATH),) + GCCSEARCHDIRS = $(shell $(CC) -print-search-dirs | grep -Po '^.*libraries: =.*' | cut -d "=" -f2- | tr : ' ') + ifneq ($(shell find $(GCCSEARCHDIRS) libhiredis_ssl.so),) + HIREDISDEFS += -DWITH_SSL + HIREDISLIBS += -lhiredis_ssl + endif + else + ifneq ($(shell ls $(HIREDISLIBSPATH) | grep libhiredis_ssl.so),) HIREDISDEFS += -DWITH_SSL HIREDISLIBS += -lhiredis_ssl - endif + endif + endif ifeq (,$(findstring hiredis,$(HIREDISDEFS))) DEFS+=-DWITH_HIREDIS_PATH
1 year, 6 months
1
0
0
0
git:master:77e74b97: ndb_redis: Missing uprotected redisSSLContext
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 77e74b974249b3c4e2e67cc074cc8ff26d50fde8 URL:
https://github.com/kamailio/kamailio/commit/77e74b974249b3c4e2e67cc074cc8ff…
Author: Joel Centelles <joel_centellesmartin(a)baxter.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2023-06-20T10:45:31+02:00 ndb_redis: Missing uprotected redisSSLContext Fixing unprotected redisSSLContext reference in redis_client.h --- Modified: src/modules/ndb_redis/redis_client.h --- Diff:
https://github.com/kamailio/kamailio/commit/77e74b974249b3c4e2e67cc074cc8ff…
Patch:
https://github.com/kamailio/kamailio/commit/77e74b974249b3c4e2e67cc074cc8ff…
--- diff --git a/src/modules/ndb_redis/redis_client.h b/src/modules/ndb_redis/redis_client.h index 9e1323981da..fd13d712902 100644 --- a/src/modules/ndb_redis/redis_client.h +++ b/src/modules/ndb_redis/redis_client.h @@ -82,7 +82,9 @@ typedef struct redisc_server param_t *attrs; char *spec; redisContext *ctxRedis; +#ifdef WITH_SSL redisSSLContext *sslCtxRedis; +#endif struct redisc_server *next; redisc_piped_cmds_t piped; redisc_srv_disable_t disable;
1 year, 6 months
1
0
0
0
git:master:90f97720: ndb_redis: Fixing global variables names
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 90f977202af2d132fb63f20f76f9ad696a19656e URL:
https://github.com/kamailio/kamailio/commit/90f977202af2d132fb63f20f76f9ad6…
Author: Joel Centelles <joel_centellesmartin(a)baxter.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2023-06-20T10:45:31+02:00 ndb_redis: Fixing global variables names Adding module name prefixing global variable names to prevent possible conflicts. Also using ca_path info in SSL context creation. --- Modified: src/modules/ndb_redis/ndb_redis_mod.c Modified: src/modules/ndb_redis/redis_client.c --- Diff:
https://github.com/kamailio/kamailio/commit/90f977202af2d132fb63f20f76f9ad6…
Patch:
https://github.com/kamailio/kamailio/commit/90f977202af2d132fb63f20f76f9ad6…
--- diff --git a/src/modules/ndb_redis/ndb_redis_mod.c b/src/modules/ndb_redis/ndb_redis_mod.c index 11d6cdb9c7..48c04a0bcc 100644 --- a/src/modules/ndb_redis/ndb_redis_mod.c +++ b/src/modules/ndb_redis/ndb_redis_mod.c @@ -55,7 +55,7 @@ int redis_flush_on_reconnect_param = 0; int redis_allow_dynamic_nodes_param = 0; int ndb_redis_debug = L_DBG; #ifdef WITH_SSL -char *ca_path = 0; +char *ndb_redis_ca_path = 0; #endif static int w_redis_cmd3( @@ -136,7 +136,7 @@ static param_export_t params[] = { {"allow_dynamic_nodes", INT_PARAM, &redis_allow_dynamic_nodes_param}, {"debug", PARAM_INT, &ndb_redis_debug}, #ifdef WITH_SSL - {"ca_path", PARAM_STRING, &ca_path}, + {"ca_path", PARAM_STRING, &ndb_redis_ca_path}, #endif {0, 0, 0}}; diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c index 00b01c9596..39b33d2066 100644 --- a/src/modules/ndb_redis/redis_client.c +++ b/src/modules/ndb_redis/redis_client.c @@ -63,7 +63,7 @@ extern int redis_flush_on_reconnect_param; extern int redis_allow_dynamic_nodes_param; extern int ndb_redis_debug; #ifdef WITH_SSL -extern char *ca_path; +extern char *ndb_redis_ca_path; #endif /* backwards compatibility with hiredis < 0.12 */ @@ -237,7 +237,7 @@ int redisc_init(void) /* Create SSL context*/ redisInitOpenSSL(); rsrv->sslCtxRedis = - redisCreateSSLContext(NULL, NULL, NULL, NULL, NULL, NULL); + redisCreateSSLContext(NULL, ndb_redis_ca_path, NULL, NULL, NULL, NULL); if(rsrv->sslCtxRedis == NULL) { LM_ERR("Unable to create Redis TLS Context.\n"); } @@ -599,7 +599,7 @@ int redisc_reconnect_server(redisc_server_t *rsrv) /* Create SSL context*/ redisInitOpenSSL(); rsrv->sslCtxRedis = - redisCreateSSLContext(NULL, NULL, NULL, NULL, NULL, NULL); + redisCreateSSLContext(NULL, ndb_redis_ca_path, NULL, NULL, NULL, NULL); if(rsrv->sslCtxRedis == NULL) { LM_ERR("Unable to create Redis TLS Context.\n"); }
1 year, 6 months
1
0
0
0
git:master:30eec549: db_redis: Fixing global variables
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 30eec549396899eae32e651ef58d65c4684ab296 URL:
https://github.com/kamailio/kamailio/commit/30eec549396899eae32e651ef58d65c…
Author: Joel Centelles <joel_centellesmartin(a)baxter.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2023-06-20T10:45:31+02:00 db_redis: Fixing global variables Adding module name prefix to global variables to reduce possible conflicts. --- Modified: src/modules/db_redis/db_redis_mod.c Modified: src/modules/db_redis/redis_connection.c --- Diff:
https://github.com/kamailio/kamailio/commit/30eec549396899eae32e651ef58d65c…
Patch:
https://github.com/kamailio/kamailio/commit/30eec549396899eae32e651ef58d65c…
--- diff --git a/src/modules/db_redis/db_redis_mod.c b/src/modules/db_redis/db_redis_mod.c index 026abeb148..89da232083 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 f38b6698d4..0bf001d152 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);
1 year, 6 months
1
0
0
0
git:master:440e8cba: db_redis: Fixing Makefile
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 440e8cba9f9e8364e100a68283137da589e6f283 URL:
https://github.com/kamailio/kamailio/commit/440e8cba9f9e8364e100a68283137da…
Author: Joel Centelles <joel_centellesmartin(a)baxter.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2023-06-20T10:45:31+02:00 db_redis: Fixing Makefile Removing unprotected references to libhiredis_ssl.so --- Modified: src/modules/db_redis/Makefile --- Diff:
https://github.com/kamailio/kamailio/commit/440e8cba9f9e8364e100a68283137da…
Patch:
https://github.com/kamailio/kamailio/commit/440e8cba9f9e8364e100a68283137da…
--- diff --git a/src/modules/db_redis/Makefile b/src/modules/db_redis/Makefile index e3a2abdd09c..7d427586e98 100644 --- a/src/modules/db_redis/Makefile +++ b/src/modules/db_redis/Makefile @@ -20,14 +20,14 @@ endif ifeq ($(HIREDIS_BUILDER),) HIREDISDEFS=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/hiredis -I/usr/include/hiredis - HIREDISLIBS=-L$(LOCALBASE)/lib -lhiredis_ssl -lhiredis + HIREDISLIBS=-L$(LOCALBASE)/lib -lhiredis ifneq ($(shell ls $(LOCALBASE) | grep libhiredis_ssl.so),) HIREDISDEFS += -DWITH_SSL HIREDISLIBS += -lhiredis_ssl endif else HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags) - HIREDISLIBS = $(shell $(HIREDIS_BUILDER) --libs) -lhiredis_ssl + HIREDISLIBS = $(shell $(HIREDIS_BUILDER) --libs) HIREDISLIBSPATH = $(shell $(HIREDIS_BUILDER) --libs-only-L | cut -c 3-) ifneq ($(shell ls $(HIREDISLIBSPATH) | grep libhiredis_ssl.so),) HIREDISDEFS += -DWITH_SSL @@ -40,7 +40,7 @@ endif ifeq ($(HIREDISLIBS),-L -lhiredis) HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags) /opt/local/include - HIREDISLIBS = -L/opt/local/lib -lhiredis -lhiredis_ssl + HIREDISLIBS = -L/opt/local/lib -lhiredis ifneq ($(shell ls /opt/local/lib | grep libhiredis_ssl.so),) HIREDISDEFS += -DWITH_SSL HIREDISLIBS += -lhiredis_ssl
1 year, 6 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
31
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Results per page:
10
25
50
100
200