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

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2024-03-19T14:26:27+01:00

ndb_redis: clang-format for WITH_SSL code

---

Modified: src/modules/ndb_redis/redis_client.c

---

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

---

diff --git a/src/modules/ndb_redis/redis_client.c 
b/src/modules/ndb_redis/redis_client.c
index ab0edf28187..9b755e42d6b 100644
--- a/src/modules/ndb_redis/redis_client.c
+++ b/src/modules/ndb_redis/redis_client.c
@@ -233,15 +233,15 @@ int redisc_init(void)
                }
 
 #ifdef WITH_SSL
-               if(enable_ssl) {
-                       /* Create SSL context*/
-                       redisInitOpenSSL();
-                       rsrv->sslCtxRedis = redisCreateSSLContext(
+               if(enable_ssl) {
+                       /* Create SSL context*/
+                       redisInitOpenSSL();
+                       rsrv->sslCtxRedis = redisCreateSSLContext(
                                        NULL, ndb_redis_ca_path, NULL, NULL, 
NULL, NULL);
-                       if(rsrv->sslCtxRedis == NULL) {
+                       if(rsrv->sslCtxRedis == NULL) {
                                LM_ERR("Unable to create Redis TLS Context.\n");
-                       }
-               }
+                       }
+               }
 #endif
 
                if(sock != 0) {
@@ -260,10 +260,10 @@ int redisc_init(void)
                }
 
 #ifdef WITH_SSL
-               if(enable_ssl) {
-                       /* Negotiate SSL/TLS handshake*/
-                       redisInitiateSSLWithContext(rsrv->ctxRedis, 
rsrv->sslCtxRedis);
-               }
+               if(enable_ssl) {
+                       /* Negotiate SSL/TLS handshake*/
+                       redisInitiateSSLWithContext(rsrv->ctxRedis, 
rsrv->sslCtxRedis);
+               }
 #endif
 
                LOG(ndb_redis_debug, "rsrv->ctxRedis = %p\n", rsrv->ctxRedis);
@@ -498,10 +498,10 @@ int redisc_reconnect_server(redisc_server_t *rsrv)
                                        pass, sizeof(pass) - 1, "%.*s", 
pit->body.len, 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)
+                       if(str2int(&pit->body, &enable_ssl) < 0)
                                enable_ssl = 0;
 #endif
                } else if(pit->name.len == 14

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to