Module: kamailio
Branch: master
Commit: 174cc5e8d1800312eaa6d1bc4fea8df7934c5b55
URL:
https://github.com/kamailio/kamailio/commit/174cc5e8d1800312eaa6d1bc4fea8df…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-04-21T19:45:01+02:00
presence: delete expired in-memory presentity records
---
Modified: src/modules/presence/publish.c
---
Diff:
https://github.com/kamailio/kamailio/commit/174cc5e8d1800312eaa6d1bc4fea8df…
Patch:
https://github.com/kamailio/kamailio/commit/174cc5e8d1800312eaa6d1bc4fea8df…
---
diff --git a/src/modules/presence/publish.c b/src/modules/presence/publish.c
index 4662965f50..dfa37c07e8 100644
--- a/src/modules/presence/publish.c
+++ b/src/modules/presence/publish.c
@@ -265,7 +265,6 @@ void ps_ptable_timer_clean(unsigned int ticks, void *param)
if(ptlist==NULL) {
return;
}
-
for(ptn = ptlist; ptn != NULL; ptn = ptn->next) {
memset(&pres, 0, sizeof(presentity_t));
@@ -316,6 +315,12 @@ void ps_ptable_timer_clean(unsigned int ticks, void *param)
}
error:
+ for(ptn = ptlist; ptn != NULL; ptn = ptn->next) {
+ if(ps_ptable_remove(ptn) <0) {
+ LM_ERR("failed deleting presentity item\n");
+ }
+ }
+
if(ptlist != NULL) {
ps_presentity_list_free(ptlist, 1);
}