[sr-dev] git:master:174cc5e8: presence: delete expired in-memory presentity records
Daniel-Constantin Mierla
miconda at gmail.com
Tue Apr 21 19:46:14 CEST 2020
Module: kamailio
Branch: master
Commit: 174cc5e8d1800312eaa6d1bc4fea8df7934c5b55
URL: https://github.com/kamailio/kamailio/commit/174cc5e8d1800312eaa6d1bc4fea8df7934c5b55
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/174cc5e8d1800312eaa6d1bc4fea8df7934c5b55.diff
Patch: https://github.com/kamailio/kamailio/commit/174cc5e8d1800312eaa6d1bc4fea8df7934c5b55.patch
---
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);
}
More information about the sr-dev
mailing list