[sr-dev] git:master: db_cluster: allow permanent inactive connection

Daniel-Constantin Mierla miconda at gmail.com
Wed Apr 11 13:35:37 CEST 2012


Module: sip-router
Branch: master
Commit: 7139fbd5d882595ff11af298918d268612ad8832
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7139fbd5d882595ff11af298918d268612ad8832

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Wed Apr 11 13:33:59 2012 +0200

db_cluster: allow permanent inactive connection

- activation time has to be set to 0 (to be possible via rpc commands)
- fix check of activation time based on inactive_interval parameter,
  reported by Juah Heinanen

---

 modules_k/db_cluster/dbcl_data.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules_k/db_cluster/dbcl_data.c b/modules_k/db_cluster/dbcl_data.c
index d961d01..94a3f1c 100644
--- a/modules_k/db_cluster/dbcl_data.c
+++ b/modules_k/db_cluster/dbcl_data.c
@@ -132,7 +132,9 @@ int dbcl_valid_con(dbcl_con_t *sc)
 		return 0;
 	if(sc->sinfo->state & DBCL_CON_INACTIVE)
 	{
-		if(sc->sinfo->aticks>0 && sc->sinfo->aticks<get_ticks())
+		if(sc->sinfo->aticks==0)
+			return -1;
+		if(sc->sinfo->aticks>get_ticks())
 			return -1;
 		sc->sinfo->aticks = 0;
 		sc->sinfo->state &= ~DBCL_CON_INACTIVE;




More information about the sr-dev mailing list