Browse Source

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
easyrider14 4 years ago
parent
commit
525ee139ab
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/cplc/cpl_run.c

+ 1 - 1
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) {