Module: kamailio Branch: master Commit: 043f31ea0314c5d1d60a6ce8ce81e626922223c4 URL: https://github.com/kamailio/kamailio/commit/043f31ea0314c5d1d60a6ce8ce81e626...
Author: Joel Centelles joel_centellesmartin@baxter.com Committer: Daniel-Constantin Mierla miconda@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/043f31ea0314c5d1d60a6ce8ce81e626... Patch: https://github.com/kamailio/kamailio/commit/043f31ea0314c5d1d60a6ce8ce81e626...
---
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"); }