Blob Blame History Raw
From: Liviu Chircu <liviu@opensips.org>
Date: Thu, 16 Nov 2017 12:06:01 +0200
Subject: [PATCH] usrloc: Fix bad logical condition
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Reported by Răzvan Crainea.

(cherry picked from commit a644f1b370d61e60b2f4de20c9728564d8d8a06d)

diff --git a/modules/usrloc/urecord.c b/modules/usrloc/urecord.c
index f14e43443..6e1b7ef26 100644
--- a/modules/usrloc/urecord.c
+++ b/modules/usrloc/urecord.c
@@ -324,7 +324,7 @@ static inline int wb_timer(urecord_t* _r,query_list_t **ins_list)
 			ptr = ptr->next;
 
 			/* Should we remove the contact from the database ? */
-			if (st_expired_ucontact(t) == 1 && (!(t->flags)&FL_MEM)) {
+			if (st_expired_ucontact(t) == 1 && !(t->flags & FL_MEM)) {
 				VAL_BIGINT(cid_vals+cid_len) = t->contact_id;
 				if ((++cid_len) == max_contact_delete) {
 					if (db_multiple_ucontact_delete(_r->domain, cid_keys,