[sr-dev] git:master:f7358b01: db_cluster: enclose block in curly braces

Daniel-Constantin Mierla miconda at gmail.com
Thu Jan 6 11:09:18 CET 2022


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-01-06T11:08:09+01:00

db_cluster: enclose block in curly braces

- fix returning always introduced in previous commit

---

Modified: src/modules/db_cluster/db_cluster_mod.c

---

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

---

diff --git a/src/modules/db_cluster/db_cluster_mod.c b/src/modules/db_cluster/db_cluster_mod.c
index c42d5b2aa9..07192d6362 100644
--- a/src/modules/db_cluster/db_cluster_mod.c
+++ b/src/modules/db_cluster/db_cluster_mod.c
@@ -263,9 +263,10 @@ static void dbcl_rpc_disable_connection(rpc_t *rpc, void *c)
 		return;
 	}
 
-	if(con->sinfo==NULL)
+	if(con->sinfo==NULL) {
 		rpc->fault(c, 500, "Cluster state info missing.");
 		return;
+	}
 
 	/* Overwrite the number of seconds if the connection is already disabled. */
 	if (con->sinfo->state & DBCL_CON_INACTIVE)




More information about the sr-dev mailing list