Module: kamailio
Branch: master
Commit: 525ee139abcb45f71bda42b417b5f8e75c12a622
URL:
https://github.com/kamailio/kamailio/commit/525ee139abcb45f71bda42b417b5f8e…
Author: easyrider14 <stephane.houssin(a)hotmail.fr>
Committer: easyrider14 <stephane.houssin(a)hotmail.fr>
Date: 2021-03-10T10:54:25+01:00
cplc: permanent contact not skipped by lookup anymore
- a permanently registered contact has an "expires" value of 0 in usrloc
when processing lookup, cplc module checks that contacts are not expired by
checking that the "expires" value of the contact is not lower than current
time
as a consequence, permanently registered contact are alsways skipped and
never targeted
---
Modified: src/modules/cplc/cpl_run.c
---
Diff:
https://github.com/kamailio/kamailio/commit/525ee139abcb45f71bda42b417b5f8e…
Patch:
https://github.com/kamailio/kamailio/commit/525ee139abcb45f71bda42b417b5f8e…
---
diff --git a/src/modules/cplc/cpl_run.c b/src/modules/cplc/cpl_run.c
index 768f6b3d4a..437e512667 100644
--- a/src/modules/cplc/cpl_run.c
+++ b/src/modules/cplc/cpl_run.c
@@ -283,7 +283,7 @@ static inline char *run_lookup( struct cpl_interpreter *intr )
} else {
contact = r->contacts;
/* skip expired contacts */
- while ((contact) && (contact->expires <= tc))
+ while ((contact) && (contact->expires > 0) &&
(contact->expires <= tc))
contact = contact->next;
/* any contacts left? */
if (contact) {