Skip to content

Commit

Permalink
usrloc: Avoid PN-related timer processing in "SQL/CacheDB Only" modes
Browse files Browse the repository at this point in the history
Since the "PN trigger" logic described in RFC 8599 is currently strongly
tied to holding in-memory contacts, avoid any crashes or other
side-effects when running in "CacheDB Only" or "SQL Only" together with
PN support by simply avoiding linking contacts into the "PN trigger"
timer list.

Fixes #2902

(cherry picked from commit 60c1d54)
  • Loading branch information
liviuchircu committed Nov 15, 2022
1 parent 9c55752 commit d656d48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/usrloc/ul_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "../../locking.h"
#include "../../lib/list.h"

#include "ul_mod.h"
#include "ul_timer.h"
#include "ul_evi.h"
#include "ul_mi.h"
Expand Down Expand Up @@ -91,6 +92,9 @@ void start_refresh_timer(ucontact_t *ct)
struct list_head *el, *_;
ucontact_t *c;

if (!have_mem_storage())
return;

lock_get(ul_refresh_lock);
if (!list_empty(&ct->refresh_list))
list_del(&ct->refresh_list);
Expand Down

0 comments on commit d656d48

Please sign in to comment.